We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24374
    • 322 Posts
    I change my table prefix to "mdb_", and the only place I see that is in config.inc.php inside the core->config folder. However, running Newspublisher, the following line appears in my pages:

    <link rel="stylesheet" href="mdb_ASSETS_URLcomponents/newspublisher/css/button.css" type="text/css" />

    What's going on here? Does newspublisher somehow create the standard settings that begin with "MODX_" by using the table prefix??? It shouldn't. How else would "mdb_ASSETS_URL" possibly show up here? I didn't globally search and replace anything.
      • 3749
      • 24,544 Posts
      AFAIK, NewsPublisher uses the MODX_ASSETS_URL which should be defined in the config.inc.php file. Is it possible that you changed that constant to mdb_ASSETS_URL? None of the all-caps constants in the file should ever be changed and it's unlikely that MODX changed it.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        A search/replace all in the config.inc.php file would certainly do that; if you changed the prefix then edited the config.inc.php file using search/replace all without making sure to respect case it would change a whole lot more than you bargained for! I've done that a time or two myself.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 24374
          • 322 Posts
          No, as I mentioned I didn't do any search and replace. I just manually changed the table prefix. All the settings in core->config->config.inc.php are "MODX_ . . .", including "MODX_ASSETS_URL". The only place I did a search and replace was in my "code" folder, where I keep the static files I use for some of my snippets, since the sometimes access the database directly. I did a global text search on my entire MODX installation (all 11,000 files) and didn't find "mdb_ASSETS_URL" anywhere.

          This line is definitely coming from Newspublisher, because it appears right before "</head>", and I have nothing there in my template. Also, when I edit a page using Newspublisher, other lines get put in correctly, like:
          <link rel="stylesheet" href="/assets/components/newspublisher/css/newspublisher.css" type="text/css" />
          <link rel="stylesheet" href="/assets/components/newspublisher/datepicker/css/datepicker.css" type="text/css" />

          but at the bottom of them all, right before "</head">, is:
          <link rel="stylesheet" href="mdb_ASSETS_URLcomponents/newspublisher/css/button.css" type="text/css" />
          [ed. note: rainbowtiger last edited this post 13 years, 9 months ago.]
            • 24374
            • 322 Posts
            OK, I found it. It was in the snippet "NpEditThisButton", on the line that should be

            $assetsUrl = $modx->getOption('np.assets_url', null, MODX_ASSETS_URL . 'components/newspublisher/');

            That's not even a text file, it's an entry in the snippets table! I have no idea how that got changed. The source for this snippet in your elements->snippets file is correct.

            Anyway, at least the mystery is solved (part of it).
              • 3749
              • 24,544 Posts
              I'm glad you got it sorted. Thanks for reporting back.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting