We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    A MODx site I have has had the URL changed, the server engineer tells me that when he removes the DNS entry or the ServerAlias from the server settings for the old domain the site falls over... Where would there be any hard coded urls in MODx to use the old URL path? He also mentions that the site is running with a symlink from the old url to the new one - without the symlink the site also falls over...

    Any ideas?

    Thanks chaps.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The only things that are hard-coded are the full paths and absolute URLs in the three config.core.php files - one in the site root, one in /connectors/ and one in /manager/, and the core/config/config.inc.php file.

      These values are calculated during setup. Running Setup again in upgrade mode should correct any necessary changes. Or, you can edit these by hand. If you do edit the config.inc.php file by hand, be very careful to examine each line. It's easy to miss one. The sections look something like this:
      if (!defined('MODX_ASSETS_PATH')) {
          $modx_assets_path= '/Applications/MAMP/htdocs/assets/';
          $modx_assets_url= '/assets/';
          define('MODX_ASSETS_PATH', $modx_assets_path);
          define('MODX_ASSETS_URL', $modx_assets_url);
      }


        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
        • 8168
        • 1,118 Posts
        Quote from: sottwell at Sep 02, 2014, 03:48 AM
        The only things that are hard-coded are the full paths and absolute URLs in the three config.core.php files - one in the site root, one in /connectors/ and one in /manager/, and the core/config/config.inc.php file.

        These values are calculated during setup. Running Setup again in upgrade mode should correct any necessary changes. Or, you can edit these by hand. If you do edit the config.inc.php file by hand, be very careful to examine each line. It's easy to miss one. The sections look something like this:
        if (!defined('MODX_ASSETS_PATH')) {
            $modx_assets_path= '/Applications/MAMP/htdocs/assets/';
            $modx_assets_url= '/assets/';
            define('MODX_ASSETS_PATH', $modx_assets_path);
            define('MODX_ASSETS_URL', $modx_assets_url);
        }



        Thanks Susan - I will have a look and see if I can find the issue in these places smiley
          • 8168
          • 1,118 Posts
          OK - all paths are fine - connecting to the correct URL path... am stumped as to what the issue here is then!
            • 8168
            • 1,118 Posts
            Server engineer informs me the references to the old URL are in the "core/cache/mgr/smarty" folder - I can just go in and physically delete those files can't I? No need for them anymore? I cleared the site cache from within the manager but appears these files still remain. Can I manually delete all files / folders in the "core/cache" folder to sort this with no ill effects on the site?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Yes, delete the whole /core/cache/ folder, MODX will regenerate it.

              BobRay has provided the CacheClear extra that will clear the entire cache. The "refresh site" cach-clearing menu item only clears resource and element caches.
                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
                • 8168
                • 1,118 Posts
                Thanks Susan.
                  • 8168
                  • 1,118 Posts
                  All sorted following forced cache folder clean - e.g. manual delete via FTP smiley Thanks Bob/Susan smiley