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

    Is it safe to upgrade a MODX Revo 2.3.2 website to the latest version 2.4.2?

    Can I do it in one step (by running just the latest updater) or do I need to run incremental updates?

    I have read through the release notes, etc. and I can't see any concrete advice on a minimum version for the 2.4.2 updater.

    Thanks.

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

    • discuss.answer
      • 22840
      • 1,572 Posts
      Personally I would recommend that you install Bob Rays UpdateModx ad-don and do the upgrades one at a time, then run a quick test after each, it's a very quick / reliable way to upgrade.
        • 33990
        • 23 Posts
        Hi Paulp

        Thanks for taking the time to reply. I've been away from MODX for a while so I hadn't heard of Bob Ray's add-on.

        I have checked out the info on Bob's website and it looks perfect! Thanks for the tip smiley
          • 3749
          • 24,544 Posts
          In one of the upgrades, the modx_context table gets a 'name' field added (and some other things). Some people who've made too big a jump in versions have reported problems due to the field not being there. Unfortunately, I don't know which upgrade adds it, so it's safer to do the intermediate upgrades.
            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
            • 33990
            • 23 Posts
            Thanks for the extra info Bob.

            I'm really glad that I asked the question now. YJ Tso's blog post (http://modx.com/blog/2015/10/06/modx-revolution-2.4.2-bug-fixes-ui-improvements/) mentions that 2.4.0 contains all patches from 2.3.6. Before reading that, I had assumed that the latest updater would automatically patch every version of Revo (from 2.2.0 onwards at least).

            It might be an idea for someone to update the official 'Upgrading MODX' guide (https://rtfm.modx.com/revolution/2.x/administering-your-site/upgrading-modx) so that people know it's necessary to upgrade incrementally.




              • 36816
              • 109 Posts
              Quote from: BobRay at Nov 30, 2015, 10:25 PM
              In one of the upgrades, the modx_context table gets a 'name' field added...

              I think a clue about DB changes appears here:

              https://github.com/modxcms/revolution/tree/2.x/setup/includes/upgrades/mysql
              https://github.com/modxcms/revolution/tree/2.x/setup/includes/upgrades/sqlsrv

              If I'm reading that right, starting from the OP's 2.3.2, it would appear that 2.4.0 and 2.4.1 had DB changes.

              The bigger question, I think, is if when skipping version updates, that all cumulative DB changes are (or are supposed to be) checked and applied during the process. It's my premise that many performing updates will assume that they are.

              Assuming that they are checked could lead to problems if setup doesn't check intermediate versions in a version-skipping update. I'm short on time to dig through the setup code to see if that's supposed to be happening, but I, for one, would really like to know, and agree with Smooth Pixel that this is something that needs to be documented with absolute clarity.

                • 36816
                • 109 Posts
                Quote from: BobRay at Nov 30, 2015, 10:25 PM
                In one of the upgrades, the modx_context table gets a 'name' field added

                It appears to have been from 2.3.0:
                https://github.com/modxcms/revolution/blob/2.x/setup/includes/upgrades/mysql/2.3.0-rc1.php#L60-L68
                  • 3749
                  • 24,544 Posts
                  Thanks. MODX is *supposed* to run all the intermediate upgrades when you skip versions. I don't know why it's not working in this case. It may be related to that being an RC version.
                    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
                    • 36816
                    • 109 Posts
                    Quote from: BobRay at Dec 01, 2015, 10:29 PM
                    Thanks. MODX is *supposed* to run all the intermediate upgrades when you skip versions. I don't know why it's not working in this case. It may be related to that being an RC version.

                    Don't know if this adds clarity, or muddies the waters, but for what it's worth, this morning, I ran a short test:

                    1. Installed a clean copy of 2.2.16 Standard Distrib as usual
                    2. Dumped database rebuild SQL statements
                    3. Upgraded directly to 2.4.2 (upload .zip, unzip on server, merge directories, run setup)
                    4. Dumped database rebuild SQL statements
                    5. Compared (file diff) the two SQL dumps to see what changed

                    I then spot-checked a number of (not all) database changes in the different intervening versions (2.3.0, 2.3.1, 2.4.0 and 2.4.1) that had database changes in https://github.com/modxcms/revolution/tree/2.x/setup/includes/upgrades/mysql, including the addition of the name column in the modx_context table and index of that column. Each of the expected database changes I checked was there in the upgraded version.

                    Wonder what went wrong in the upgrades where there were reports of that database column not being added. Frustrating.
                      • 3749
                      • 24,544 Posts
                      That's a clever bit of research. smiley

                      I've seen a number of reports of MODX throwing an error about the missing 'name' column in the modx_context table after an upgrade (though I've never experienced it). Like you, I wonder what might have caused it. Maybe it's upgrading from 2.2.0 or maybe it's just an interaction of a particular pair of MODX versions. I'm starting to think we may never know. wink
                        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