1

Have a site which is on version 3.6.16 I was running the upgrade to the latest versions and it crashed.
I have restored the database and componser.json and composer.lock files and ran composer install after removing the vendor folder. (Database shows version 3.6.16)

When I try to access the control panel then I get the message:

To complete the update, some changes must be made to your database. When I click on Finish Up - some database changes get applied and when logged in it says I'm on version 3.7.34

When I look at composer.json it still says "craftcms/cms": "3.6.16".

I'm fairly sure something is out of sync here - I don't think I should be getting the "To complete the update" message and migrations applied?

The control panel seems to work ok at the moment but it says there are no updates available.

1 Answer 1

1

Something is definitely out of sync, yes – to make sure everything is in order before proceeding to retry the upgrade, I'd try the following:

  1. Restore the database to a backup pre-upgrade attempt
  2. Restore the composer.json and composer.lock files to their state pre-upgrade attempt
  3. Delete the vendor folder and run composer install
  4. Clear all caches via php craft clear-caches/all (or via the Clear Caches utility in the Control Panel)
  5. Rebuild the project config via php craft project-config/rebuild (or via the Project Config utility in the Control Panel)

Finally, if by "crashed" you mean that the previous upgrade attempt failed due to a PHP timeout, consider upgrading using Craft's CLI, i.e. by running php craft update in your terminal instead of upgrading via the Control Panel.

7
  • Ok - I have completed 1-5 above. When I look in the db craft_info version says 3.6.16 When I try to access the control panel I get the message: "To complete the update, some changes must be made to your database." with the finish up button. When I click that and when it completes the craft_info table version now shows: 3.7.34 This doesn't seem right. What makes that "Complete the update" element run?
    – mmc501
    Commented Mar 1, 2022 at 8:39
  • If I manually change my composer.json file to the latest version then run composer update, is that a safe method to bring me back into sync?
    – mmc501
    Commented Mar 1, 2022 at 11:23
  • If you get the To complete the update... message after completing those steps, and those migrations actually run, that definitely means that you've still got Craft 3.7.34 in your vendor folder, not 3.6.16. Most likely, that would mean your (restored) composer.lock file doesn't specify the version you think it does. After completing steps 1 and 2, I'd double check that file to see if it actually specifies 3.6.16 (you can do a text search for "name": "craftcms/cms"). Commented Mar 1, 2022 at 18:38
  • Just checked in the composer.lock file I was using: I am getting this: "name": "craftcms/cms", "version": "3.6.16", so seems to be ok. Looking at my composer.lock file after To complete the update... has run it still says "name": "craftcms/cms", "version": "3.6.16", and composer.json file still says: "require": {"craftcms/cms": "3.6.16",. But when I login to the control panel it has all the features of 3.7.34 (i checked change log). When I go to vendor/craftcms/cms/composer.json it says "version": "3.6.16"
    – mmc501
    Commented Mar 1, 2022 at 22:06
  • 1
    Thanks for the assistance
    – mmc501
    Commented Mar 2, 2022 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.