We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37596
    • 18 Posts
    Hello,

    I am trying to upgrade the database of an evo install to a revo, and it seemed to be fine, the setup script detected an older version and asked if i wanted to run an update - however anytime I try to visit the site it shows this:

    500 Error
    A fatal application error has been encountered.

    Any idea's what I can check to see what is causing it? Nothing seems to come up in the apache error logs so seems like it's an error generated directly by ModX, are there logs generated anywhere by ModX?

    Thanks!
      • 3749
      • 24,544 Posts
      There is no direct upgrade path between Evo and Revo. Doing a Revo install on top of an Evo site will not be kind to your MODX database. I'm surprised that Setup didn't warn you.
        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
        • 37596
        • 18 Posts
        I was going off of this:

        http://rtfm.modx.com/display/revolution20/Upgrading+from+MODx+Evolution

        Or is that only for the 2.0 database? I'm trying with the 2.1.

        Thanks.
          • 3749
          • 24,544 Posts
          I think this is the key part of that page: "we don't recommend this." wink

          I wasn't aware of the possibility and I've never tried it, so I'm not sure what might cause that. Server 500 errors are a real pain to diagnose.

          There are some ideas here: http://bobsguides.com/modx-installation-faq.html.

          If probably would have been wise to disable or uninstall all plugins and snippets before doing the upgrade.


          A good first step would be to delete all the files in the core/cache directory and clear your browser cache and cookies.

          It's possible that some files did not overwrite existing files when you installed the Revo files (you did install the Revo core, manager, and connectors directories, right?).

          Check the file core/config.config.inc.php and make sure the paths are correct.

          Another thing to try would be to go into PhpMyAdmin (modx_system_settings table), turn FURLs off, then rename .htaccess to something else.

          One more option would be to edit the modx_site_plugins table and disable all plugins (set the disabled field to 1).

          Finally, you could edit the modx_site_content table and disable all snippets by putting a space between the opening brackets (except the *content tags).Then do the same in the chunks table (modx_site_htmlsnippets) and maybe the templates table (modx_site_templates).

          If that works, you could re-enable the plugins and snippets one-by-one to see which one(s) are causing trouble. [ed. note: BobRay last edited this post 14 years, 11 months ago.]
            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
            • 37596
            • 18 Posts
            Thanks for the info, when checking the cache directory I found some logs. The error_log seems to have this error in it:

            [2011-11-16 10:16:03] (FATAL) Could not load core MODX configuration!

            Which, I think is the cause of the 500 error. I checked the path and the modx config.php file is in /core/config/ and it even looks like the 'setup' updated the file for me.

            I also seen the following an in an install log:

            [2011-11-16 10:16:03] (ERROR @ /testupdate/index.php) Error 42S22 executing statement:
            Array
            (
            [0] => 42S22
            [1] => 1054
            [2] => Unknown column 'modSystemSetting.key' in 'field list'
            )

            I should probably add that this is actually a fresh upload of modx revo in a separate directory, I simply have it connecting to the evo database and did a copy of another modx 2.1 install of the config.php and updated the db and path info.

            Do you think I would have better luck trying with 2.0 files instead of 2.1?

            Thanks,
            Melissa
              • 37596
              • 18 Posts
              Just tried with 2.0.8 and same errors occur in the logs...is there another location where the config path needs to be updated? I'm not sure if it's saved in the db.
                • 3749
                • 24,544 Posts
                Yes, there are also four config.core.php files that identify the location of the MODX core. There is a config.core.php file in each of the following directories:

                § MODX root directory
                § /manager/
                § /connectors/
                § /setup/includes/


                I would recommend sticking with the current version of MODX.
                  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
                  • 37596
                  • 18 Posts
                  Thanks, I checked all 4 locations and the config.core.php files are located in each, they all seem to have the same code:

                  define('MODX_CORE_PATH', dirname(dirname(__FILE__)) . '/core/');
                  define('MODX_CONFIG_KEY', 'config');

                  Except the setup/includes which has this:

                  define ('MODX_CORE_PATH', MODX_INSTALL_PATH . 'core/');
                  define ('MODX_CONFIG_KEY', 'config');
                  define ('MODX_SETUP_KEY', '@traditional@');

                  I checked an active 2.1 install I have and the same files exist and have the same data as well.

                  Not quite sure what else I may be missing sad
                    • 3749
                    • 24,544 Posts
                    That first message is printed in the core/model/modx/modx.class.php file around line 1140. I think the second error is a side effect of the failure to load the config info.

                    I think the most likely trouble spots are around lines 479, 1997 of that class file. If you're not tired of wrestling with this, I think you could start throwing in some debugging code like this in the function at line 479 (getCacheManager()):
                    die('XPDO PATH: ' . XPDO_CORE_PATH);


                    You could also look at the target paths there and see if the directories and files actually exist.

                    FYI, there's a whole other way to approach the conversion to Revo here: http://bobsguides.com/migrating-revolution.html.


                    I used Provisioner when I migrated Bob's Guides, but that was a while back and it doesn't work with the current Versions of MODX. You'd probably have to downgrade at least one of them to use it, then upgrade.
                      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
                      • 37596
                      • 18 Posts
                      I placed that code in and it comes with with the following path:

                      XPDO PATH: /home/user/public_html/testupdate/core/xpdo/

                      Is there a similar code to see specifically where it's trying to load the core config from?

                      I did use your guide for another site (it helped a lot) but my issue with this one is that I'm trying to upgrade an install that has ~100 or so documents. So I can't easily add them all in manually. I really don't care if the settings, users, templates, snippets etc need to be re-added. My main issue is just making sure the documents are converted over.