We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49681
    • 10 Posts
    Hey there, I have been tasked with moving a MODx installation to a new host. The last developer up and left the project leaving me with lots of questions. I am having a heck of a time getting this thin to function now so expect a lot of questions from me. Sorry...

    Anyway, going through the "Moving your site to a new server" setup page I have come to the "Update your Database" section. Under this section is says to run this query
    SELECT `path` FROM `your_revo_db`.`workspaces`;
    I know that the your_revo_db needs to renamed, but I have no idea what the workspaces is called in the existing database. when I run the query in phpmyadmin I get an error that .workspace does not exist. Exact error-

    Error
    SQL query: Documentation

    SELECT `path`
    FROM `irco_modx`.`workspaces`
    LIMIT 0 , 30;


    MySQL said: Documentation

    #1146 - Table 'irco_modx.workspaces' doesn't exist


    Any idea what I may be doing wrong or how I can figure out what the workspaces are now called?

    Thanks so much.



      • 28042 ☆ A M B ☆
      • 24,524 Posts
      What version of MODX is this? Is there a file in the root named "config.core.php"?
        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
        • 49681
        • 10 Posts
        Yes there is. The version that he was using is 2.2.7. I know it is an older version, I just want to get out operational again before I worry about updating it. Thank you very much.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ok, I was just checking that it wasn't Evolution.

          Don't worry about that table just yet. To be honest, I've never found it necessary to deal with it, but there are some cases where it has old file paths. Just move the files, import the database, make sure the core/config/config.inc.php file has the correct database information, and run the setup in upgrade mode. If you don't have a copy of the setup folder, you can download the modx zip file from here http://modx.com/download/previous-releases/
            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
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            And by the way, the table is still 'workspaces'. The problem may be your table prefix, by default it's modx_, so the full tablename wold be modx_workspaces, but if your installation used a different prefix that would be your problem.

            It should probably look something like this: irco_modx.modx_workspaces'
              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
              • 49681
              • 10 Posts
              Okay, thank you. I have the modx zip file on the server right now, but for some reason it won't properly unzip. I have contacted my hosts support to try and get that issue resolved. Once I can get it unzipped I will give setup a shot. I will let you know how it goes. Thanks again so much!
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                You can get by without running the update.

                Check the config.core.php files - one in the site root, one in connectors and one in manager to make sure they point to the core directory properly. For example, on my MAMP installation
                define('MODX_CORE_PATH', '/Applications/MAMP/htdocs/revo232/core/');
                


                Check the config.inc.php file to make sure all of the defined paths are pointing to the correct paths. Here are a few examples on my MAMP installation
                if (!defined('MODX_CORE_PATH')) {
                    $modx_core_path= '/Applications/MAMP/htdocs/revo232/core/';
                    define('MODX_CORE_PATH', $modx_core_path);
                }
                ...
                ...
                if (!defined('MODX_ASSETS_PATH')) {
                    $modx_assets_path= '/Applications/MAMP/htdocs/revo232/assets/';
                    $modx_assets_url= '/revo232/assets/';
                    define('MODX_ASSETS_PATH', $modx_assets_path);
                    define('MODX_ASSETS_URL', $modx_assets_url);
                }
                

                When editing the config.inc.php file to correct the database connection information, make sure to get the database_dsn line
                $database_dsn = 'mysql:host=localhost;dbname=revo232;charset=utf8';

                  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
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Then delete the entire core/cache directory (MODX will re-generate it as needed).

                  Your domain's control panel should have some way of working with the database, most likely phpMyAdmin. You can use that to check the modx_workspaces table to make sure there aren't any references to the old paths.
                    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
                    • 49681
                    • 10 Posts

                    Okay. The Database dsn line is correct and this is what I have for the rest. I used the full path to select where the folders are-

                    if (!defined('MODX_CORE_PATH')) {
                        $modx_core_path= '/home/users/web/b2417/ipw.ircoorg/public_html/core/';
                        define('MODX_CORE_PATH', $modx_core_path);
                    }
                    if (!defined('MODX_PROCESSORS_PATH')) {
                        $modx_processors_path= '/home/users/web/b2417/ipw.ircoorg/public_html/core/model/modx/processors/';
                        define('MODX_PROCESSORS_PATH', $modx_processors_path);
                    }
                    if (!defined('MODX_CONNECTORS_PATH')) {
                        $modx_connectors_path= '/home/users/web/b2417/ipw.ircoorg/public_html/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= '/home/users/web/b2417/ipw.ircoorg/public_html/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= '/home/users/web/b2417/ipw.ircoorg/public_html/';
                        $modx_base_url= '/';
                        define('MODX_BASE_PATH', $modx_base_path);
                        define('MODX_BASE_URL', $modx_base_url);




                    As for the query changing to modx_workspaces, I still get this error-

                    Error
                    SQL query: Documentation
                    
                    SELECT  `path` 
                    FROM  `irco_modx`.`modx_workspaces` 
                    LIMIT 0 , 30;
                    
                    
                    MySQL said: Documentation
                    
                    #1146 - Table 'irco_modx.modx_workspaces' doesn't exist 


                    Under the irco_modx database I see a lot of things, none of which say modx_workspaces or irco_modx_workspaces. I have included a screen shot of teh entire database structure for a visual aid.
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      That's only about half of the database. Are you sure there isn't some kind of paging there?
                        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