We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9550
    • 123 Posts
    UPDATE: I didn’t the Base href tag in my headers. My original post is below this line.

    I followed every single step in this guide:

    http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server

    trying to migrate my locally developed MODx rev site from http://ojs/rawc2 to http://raw/

    side note: attempting to resolve this well reported yet unresolved issue with phpthumbof not working when MODx is installed in a subdirectory (see: http://modxcms.com/forums/index.php/topic,59490.20.html)

    migration went fine EXCEPT I can’t get MODx to regenerate the links on the front end !!!!!!!!!!!!!!!!!!

    I’ve cleared cached a dozen times, double tripple checked my config.inc.php, scoured the database for old URLs, switched every resource to uncached and even reran setup. Even turning on and off FURLs just changes them if it was at the old location....

    .htaccess:

    RewriteEngine On
    RewriteBase /

    config.inc.php

    <?php
    /**
     *  MODx Configuration file
     */
    $database_type = 'mysql';
    $database_server = 'localhost';
    $database_user = '[REMOVED]';
    $database_password = '[REMOVED]';
    $database_connection_charset = 'latin1';
    $dbase = '`rawc2`';
    $table_prefix = 'modx_';      
    
    $lastInstallTime = 1301737803;
    
    $site_id = '[REMOVED]';
    $site_sessionname = '[REMOVED]';
    $https_port = '443';
    $uuid = '[REMOVED]';
    
    if (!defined('MODX_CORE_PATH')) {
        $modx_core_path= '/Users/ojs/Sites/rawc2/core/';
        define('MODX_CORE_PATH', $modx_core_path);
    }
    if (!defined('MODX_PROCESSORS_PATH')) {
        $modx_processors_path= '/Users/ojs/Sites/rawc2/core/model/modx/processors/';
        define('MODX_PROCESSORS_PATH', $modx_processors_path);
    }
    if (!defined('MODX_CONNECTORS_PATH')) {
        $modx_connectors_path= '/Users/ojs/Sites/rawc2/connectors/';
        $modx_connectors_url= '/connectors/';
        define('MODX_CONNECTORS_PATH', $modx_connectors_path);
        define('MODX_CONNECTORS_URL', $modx_connectors_url);
    }
    if (!defined('MODX_MANAGER_PATH')) {
        $modx_manager_path= '/Users/ojs/Sites/rawc2/manager/';
        $modx_manager_url= '/manager/';
        define('MODX_MANAGER_PATH', $modx_manager_path);
        define('MODX_MANAGER_URL', $modx_manager_url);
    }
    if (!defined('MODX_BASE_PATH')) {
        $modx_base_path= '/Users/ojs/Sites/rawc2/';
        $modx_base_url= '/';
        define('MODX_BASE_PATH', $modx_base_path);
        define('MODX_BASE_URL', $modx_base_url);
    }
    if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
    	$isSecureRequest = false;
    } else {
    	$isSecureRequest = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
    }
    if (!defined('MODX_URL_SCHEME')) {
        $url_scheme=  $isSecureRequest ? 'https://' : 'http://';
        define('MODX_URL_SCHEME', $url_scheme);
    }
    if (!defined('MODX_HTTP_HOST')) {
    	if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
    		$http_host='raw';
    		define('MODX_HTTP_HOST', $http_host);
    	} else {
    		$http_host= $_SERVER['HTTP_HOST'];
    		if ($_SERVER['SERVER_PORT'] != 80) {
    			$http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
    		}
    		$http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
    		define('MODX_HTTP_HOST', $http_host);
    	}
    }
    if (!defined('MODX_SITE_URL')) {
        $site_url= $url_scheme . $http_host . MODX_BASE_URL;
        define('MODX_SITE_URL', $site_url);
    }
    if (!defined('MODX_ASSETS_PATH')) {
        $modx_assets_path= '/Users/ojs/Sites/rawc2/assets/';
        $modx_assets_url= '/assets/';
        define('MODX_ASSETS_PATH', $modx_assets_path);
        define('MODX_ASSETS_URL', $modx_assets_url);
    }
    if (!defined('MODX_LOG_LEVEL_FATAL')) {
        define('MODX_LOG_LEVEL_FATAL', 0);
        define('MODX_LOG_LEVEL_ERROR', 1);
        define('MODX_LOG_LEVEL_WARN', 2);
        define('MODX_LOG_LEVEL_INFO', 3);
        define('MODX_LOG_LEVEL_DEBUG', 4);
    }
    if (!defined('MODX_CACHE_DISABLED')) {
        $modx_cache_disabled= false;
        define('MODX_CACHE_DISABLED', $modx_cache_disabled);
    }
    
    


    WHERE THE HELL IS GETTING THE DATA FOR THE OLD URL’s FROM ??!?!

    SERIOUSLY!!!!!!!?!?!?!?!?
      • 22840
      • 1,572 Posts
      You should really take your database password out of the config file when posting it on here wink
        • 9550
        • 123 Posts
        paulp: thanks... good tip.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          There are three or four cache files in Revo; I’m not sure where they all are since I don’t use it, but I have seen a number of posts on the forums that mention them.
            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
            • 9550
            • 123 Posts
            sottwell: there’s a whole directory of cache files, but even if I rearrange the menu bar or create new link, MODx is updates the content but still pulls the base URL of the old location.

            Unless I’m missing something, wherever it is getting this from doesn’t seem covered in the migration guide nor can I find the setting or cached data that is controlling this output. And I am quite at a loss how to fix it.
              • 22019
              • 390 Posts
              Answered in your other thread, but you can also try deleting the files in core/cache if the cache isn’t being cleared.

              Phpthumbof DOES work in sub-dirs, I have it working on several installs. Perhaps it is an environment issue.
                Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                • 9550
                • 123 Posts
                just deleted the folders and files in the cache dir. no change. same issue.

                does everything look correct in my config.inc.php huh is that not where MODx should be pulling this information?

                note: i tried your fix of setting those variables in the config, but that had no change on the error generated by phpthumbof when running from within a subdirectory

                UPDATE: just tried uninstalling all packages. no change. MODx still can’t seem to generate links using the new base_URL info set in my config. it still seems to be pulling some phantom cached or configured data from some that I can not find or find documentation of, unless I’m missing something, which is totally possible. BUT WHAT IS IT?!?!?!
                  • 22019
                  • 390 Posts
                  What version of Revolution are you using?

                  What url is [[++site_url]] producing?
                  What url do you see when previewing a resource?
                  If you try accessing a URL directly (the one you think it should be) what happens?
                  What FURLS settings are you using?
                  Any other errors in the MODX log?
                    Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                    • 9550
                    • 123 Posts
                    I’m running 2.0.8pl

                    previewing pulls up the correct URL using the updated base url

                    from the phpthumbof thread:

                    Quote from: featherodd at Apr 02, 2011, 06:44 AM

                    odeclas: thanks for your help.

                    [[!++site_url]] spits out the new correct base path > http://raw/

                    ...

                    links generated by modx still have the wrong base URL >> http://ojs/rawc2/

                    I can navigate manually to a resource just fine. MODx still fails generating new links to resources.


                    and nothing new in the error log

                    side note: thanks for all your help man. apologies if I’m a bit short. it’s almost 6am here and I’m more fed up with MODx rev than I have been with anything in quite a looooooong time.
                      • 22019
                      • 390 Posts
                      Is the site publicly accessible - might be easier to check a couple of things...?

                      Message me if you don’t want it public.
                        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86