We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    Trying to update modx 2.1.5 -> 2.2.10, failed several times so I tried to update it from 2.1.5 -> 2.2.0 ~ the next available dist. I'm still getting all kinds of weird problems and don't know how to fix the issues.

    - The upgrade appears to go fine until I try to log into the manager, I still get the previous managers log in splash screen even if I clear BOTH modx and browser caches. This happens for both upgrade attempts 2.1.5 -> 2.2.1- AND 2.1.5 -> 2.2.10

    - on any update attempt I can log into the manager but get that famous menu and all the rest is a white screen.

    - I have triple checked:
    /config.core.php
    /manager/config.core.php
    /connectors/config.core.php
    /core/conf/config.inc.php
    db -> modx_workspaces
    db -> modx_system_settings -> compress_js
    db -> modx_system_settings -> compress_css

    Before and after the upgrade attempts and all appear correct [toggling off the compression and furls as well]


    The errors I consistently get in the logs are:

    install.config.2014-01-07T23.34.31.log

    [2014-01-07 23:34:34] (ERROR @ /var/www/vhosts/domain.com/httpdocs/core/xpdo/cache/xpdocachemanager.class.php : 365) PHP warning: copy(/var/www/vhosts/domain.com/httpdocs/manager/assets/ext3/adapter/jquery/ext-jquery-adapter-debug.js): failed to open stream: Permission denied
    [2014-01-07 23:34:34] (ERROR @ /setup/index.php) xPDOCacheManager->copyFile(): Could not copy file /var/www/vhosts/domain.com/httpdocs/core/packages/core/modContext/065691d0e4db2ae48028476000a1de3f/0/assets/ext3/adapter/jquery/ext-jquery-adapter-debug.js to /var/www/vhosts/domain.com/httpdocs/manager/assets/ext3/adapter/jquery/ext-jquery-adapter-debug.js
    [2014-01-07 23:34:34] (ERROR @ /setup/index.php) Could not copy file /var/www/vhosts/domain.com/httpdocs/core/packages/core/modContext/065691d0e4db2ae48028476000a1de3f/0/assets/ext3/adapter/jquery/ext-jquery-adapter-debug.js to /var/www/vhosts/domain.com/httpdocs/manager/assets/ext3/adapter/jquery/ext-jquery-adapter-debug.js; could not create directory.
    [2014-01-07 23:34:34] (ERROR @ /var/www/vhosts/domain.com/httpdocs/core/xpdo/cache/xpdocachemanager.class.php : 365) PHP warning: copy(/var/www/vhosts/domain.com/httpdocs/manager/assets/ext3/adapter/prototype/ext-prototype-adapter-debug.js): failed to open stream: Permission denied
    [2014-01-07 23:34:34] (ERROR @ /setup/index.php) xPDOCacheManager->copyFile(): Could not copy file /var/www/vhosts/domain.com/httpdocs/core/packages/core/modContext/065691d0e4db2ae48028476000a1de3f/0/assets/ext3/adapter/prototype/ext-prototype-adapter-debug.js to /var/www/vhosts/domain.com/httpdocs/manager/assets/ext3/adapter/prototype/ext-prototype-adapter-debug.js
    [2014-01-07 23:34:34] (ERROR @ /setup/index.php) Could not copy file /var/www/vhosts/domain.com/httpdocs/core/packages/core/modContext/065691d0e4db2ae48028476000a1de3f/0/assets/ext3/adapter/prototype/ext-prototype-adapter-debug.js to /var/www/vhosts/domain.com/httpdocs/manager/assets/ext3/adapter/prototype/ext-prototype-adapter-debug.js; could not create directory.
    [2014-01-07 23:34:34] (ERROR @ /var/www/vhosts/domain.com/httpdocs/core/xpdo/cache/xpdocachemanager.class.php : 365) PHP warning: copy(/var/www/vhosts/domain.com/httpdocs/manager/assets/ext3/adapter/yui/ext-yui-adapter-debug.js): failed to open stream: Permission denied
    [2014-01-07 23:34:34] (ERROR @ /setup/index.php) xPDOCacheManager->copyFile(): Could not copy file /var/www/vhosts/domain.com/httpdocs/core/packages/core/modContext/065691d0e4db2ae48028476000a1de3f/0/assets/ext3/adapter/yui/ext-yui-adapter-debug.js to /var/www/vhosts/domain.com/httpdocs/manager/assets/ext3/adapter/yui/ext-yui-adapter-debug.js
    [2014-01-07 23:34:34] (ERROR @ /setup/index.php) Could not copy file /var/www/vhosts/domain.com/httpdocs/core/packages/core/modContext/065691d0e4db2ae48028476000a1de3f/0/assets/ext3/adapter/yui/ext-yui-adapter-debug.js to /var/www/vhosts/domain.com/httpdocs/manager/assets/ext3/adapter/yui/ext-yui-adapter-debug.js; could not create directory.



    cat install.config.20140107T233422.log
    [2014-01-07 23:34:22] (ERROR @ /setup/index.php) Error 42S22 executing statement:
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modContext.rank' in 'field list'
    )
    
    [2014-01-07 23:34:22] (ERROR @ /setup/index.php) Could not prepare context: mgr




    cat install.config.20140107T233431.log
    [2014-01-07 23:34:31] (ERROR @ /setup/index.php) Error 42S22 executing statement:
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modContext.rank' in 'field list'
    )
    
    [2014-01-07 23:34:31] (ERROR @ /setup/index.php) Could not prepare context: mgr



    cat error.log
    [2014-01-07 23:35:16] (ERROR @ /var/www/vhosts/domain.com/httpdocs/core/model/smarty/plugins/function.math.php : 27) User warning: math: missing equation parameter
    [2014-01-07 23:35:16] (ERROR @ /var/www/vhosts/domain.com/httpdocs/core/model/smarty/plugins/function.math.php : 27) User warning: math: missing equation parameter
    [2014-01-07 23:35:16] (ERROR @ /var/www/vhosts/domain.com/httpdocs/core/model/smarty/plugins/function.math.php : 27) User warning: math: missing equation parameter




    The errors that are saying things like:

    Could not copy file /var/www/vhosts/domain.com/httpdocs/core/packages/core/modContext/0.....

    sure look to me like there is a core path definition somewhere that is not correct but I can't find it anywhere.


    Anyone have any thoughts on this one?







    This question has been answered by sean69. See the first response.

    [ed. note: sean69 last edited this post 12 years, 9 months ago.]
      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525
      • 21395
      • 91 Posts
      Have you checked your directory permissions? You've got several "can't create" errors in the log and one possible cause is too strict permissions, possibly caused by hardening your site in the past.

      Been there - but not with these errors. Just a suggestion.


      Nic Boyde
        MODX Revolution 2.6.5-pl (traditional)

        Hosted on MODX Cloud

        Skype: nicbaldeagle
        • 40944
        • 78 Posts
        I had similar problems upgrading modx (https://forums.modx.com/thread/88195/failed-to-update-modx#dis-post-485387)

        Have you tried copying modx to your local drive and merging the files there? That worked for me.
          • 3749
          • 24,544 Posts
          Sean, I assume that you've manually deleted all the files in the core/cache directory.

          Did you clear the browser *cookies* as well? A leftover cookie can cause all kinds of mayhem.

          From the error messages, though, it does look like a permission issue as Nic suggests, with the new files not always being copied over the old ones. Did you use FTP to transfer the files? There's a more reliable method described here: http://bobsguides.com/modx-upgrade-faq.html.

          I'd also recommend disabling all plugins, in PhpMyAdmin if necessary (modx_site_plugins table) before running setup again. There are some plugins that could conceivably interfere with an 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
            • 26503
            • 620 Posts
            Hi Bob;

            I do everything from the shell [as I have root access] so yes, I've been through the permissions gong show.

            - manually cleared the cache, yes, I actually have a line in the upgrade shell script I wrote [which really does nothing more than backup the old files, database and setting, download, unzip files and clear the cache - I set ownership and permissions manually]

            - cookies, yes, I've tried different browsers, incognito mode, clearing caches and cookies between each step.

            - FTP, no the script wgets the distro and copies files. I generally set the system files to the webserver owner and assets to the ftp user. as far as permissions I even chmod -R 777 /manager/ /connectors/ and /core/ just to see if that was the problem [no it wasn't]

            - plugins - I did disable them, luckily the only one they were using was tinymce.


            Gonna take another stab at it tonight.



            Quote from: BobRay at Jan 08, 2014, 04:48 PM
            Sean, I assume that you've manually deleted all the files in the core/cache directory.

            Did you clear the browser *cookies* as well? A leftover cookie can cause all kinds of mayhem.

            From the error messages, though, it does look like a permission issue as Nic suggests, with the new files not always being copied over the old ones. Did you use FTP to transfer the files? There's a more reliable method described here: http://bobsguides.com/modx-upgrade-faq.html.

            I'd also recommend disabling all plugins, in PhpMyAdmin if necessary (modx_site_plugins table) before running setup again. There are some plugins that could conceivably interfere with an upgrade.

              *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

              Sean Kimball CLP, CLS.
              Technical Director / Sr. Developer | BigBlock Studios
              ._______________________________________________.
              Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
              27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
              phone/fax: 905-426-5525
              • 26503
              • 620 Posts
              @erwin thanks, though I think that is a last resort. I'd really like to know what the problem is so I can look out for it in the future. [I wonder what a reinstall of 2.1.5 will do.... hmmmmmm]

              @nic, yes I have, see my reply to Bob. the site actually was hardened at one point, I had to roll it back to the standard type distro to get an update to get this far!
                *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

                Sean Kimball CLP, CLS.
                Technical Director / Sr. Developer | BigBlock Studios
                ._______________________________________________.
                Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
                27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
                phone/fax: 905-426-5525
              • discuss.answer
                • 26503
                • 620 Posts
                well, I wish I could say I knew what was wrong, but I did fix it.

                since none of the extras [but tinymce] had manager components - I just deleted the manager directory & copied the dist. files over, re-installed all the extras and got it working again.
                  *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

                  Sean Kimball CLP, CLS.
                  Technical Director / Sr. Developer | BigBlock Studios
                  ._______________________________________________.
                  Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
                  27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
                  phone/fax: 905-426-5525
                  • 40944
                  • 78 Posts
                  Quote from: sean69 at Jan 08, 2014, 07:34 PM
                  well, I wish I could say I knew what was wrong, but I did fix it.

                  since none of the extras [but tinymce] had manager components - I just deleted the manager directory & copied the dist. files over, re-installed all the extras and got it working again.
                  I think the merging files part has gone wrong. If this was the case with the manager folder, it might as well be with the rest of the modx folders. I would make a back-up, zip (archive) it and download it to your local harddrive. Then merge the update files and run the setup in/on a different folder/server (localhost for example).
                    • 36996
                    • 211 Posts
                    I'm having similar problems upgrading from version 2.2.4
                    I tried everything bob suggested, and also uninstalling tinymce before upgrading, but nothing works for me.
                    This is what I get in the installation log:
                    Error updating table for class modResource
                    Array
                    (
                    [0] => 00000
                    [1] => 
                    [2] => 
                    )
                    
                    Error updating table for class modTemplateVarResource
                    Array
                    (
                    [0] => 00000
                    [1] => 
                    [2] => 
                    )
                    


                    Everything is working after the upgrade, except for the version number which stays the same, and I don't have the top bar buttons so I can't really edit chunks or tempaltes.
                    Any suggestions?

                    Edit:
                    this is the js error I'm getting:
                    Uncaught TypeError: Cannot call method 'getTopToolbar' of undefined


                    [ed. note: nir-z last edited this post 12 years, 9 months ago.]
                      • 36996
                      • 211 Posts
                      Just to prove to my self that I'm still sane, I just upgraded a 2.2.8 website on the same server.
                      The whole thing lasted less than 10 minutes with no errors.

                      Question: can duplicate uris on a website cause these upgrade errors?