We are still in development phase of our Commerce site. A couple months back we accidentally (composer) upgraded commerce from 2.14 to 2.16. This made a huge mess (see #3100553: Upgrade to 2.16 Error Drupal\Core\Field\FieldException: Attempt to create a configurable field of non-configurable field storage order_items) and it took days to clean up everything and get back to 2.14.
As we get to the final bits of our site prior to launch it seems there are a lot of issues with Commerce: user's can't use a different CC after using the first one, admins can make CC payments to client accounts, admins can't use different enabled payment methods, etc. It has been suggested that we will need to bite the bullet and upgraded to 2.17 to possibly fix some of these issues.
I have backed up db and made a copy of the code. We are at 2.14 and cron, updb and cr all complete as expected.
composer require drupal/commerce
composer require drupal/commerce:2.15
both give the same issue:
drupal/commerce_payment 2.16.0 requires drupal/commerce 2.16.0 -> satisfiable by drupal/commerce[2.16.0] but these conflict with your requirements or minimum-stability.
I have removed composer.lock and there are no commerce entries in composer.json
Ideally, from what i have seen, it might be best to go first to 2.15, before going to 2.16 - anyone have any idea how to upgrade commerce from 2.14 to 2.17?
Comments
Comment #2
liquidcms commented2.14 to 2.15 - seems ok so far
- delete vendor folder (in folder above docroot)
- delete composer.lock
- composer require drupal/commerce:2.15
- drush updb
- drush cr
- drush cron
this updated Commerce (and associated commerce modules) to 2.15. It also updated core (to 8.8.3) and many other modules (but not all as not all are listed in composer.json)
everything on the site seems fine so far other than a few contrib module updates have broken things. Since the entire code base is under SVN, i simply delete busted module and replace with the repo version. i see that (annoyingly) composer wipes out everything in the old folder for a contrib module - good that it removes old code due to how class files get loaded; bad that it deletes patch files that were in the folder. I know there is a way to manage patch files through composer; but haven't set that up yet.. and honestly, what are the odds that it works reliably??
more testing to sort out what patches have been lost.. and then on to the bigger move of going from 2.15 to 2.16
Comment #3
nigelcunningham commentedI'm just going straight to 2.17. You shouldn't need to go to 15 and then 16 and then 17 because any changes made in each of those versions will be applied via update hooks in the modules. The hooks are added cumulatively so going straight from 14 to 17 will just run them all at once rather than some subset, another subset and whatever remains.
Hope that helps!
Comment #4
liquidcms commentedYes, tried that a couple months ago. There are issues with the upgrade to 2.16. Comments from commerce maintainers have suggested going to 2.15 first is a good idea.
2.15 update seemed to go well enough. will try update to 2.16 tomorrow.
Comment #5
bojanz commentedSkipping versions always increases risk of something going wrong. Drupal's update system is fragile.
Comment #6
nigelcunningham commentedThat's not true. I've been using Drupal since 2006 and it has never been fragile.
The software isn't perfect, I will agree. And the quality of anyone's experience will vary according to the quality of coding in the modules they add. But Drupal's update system is solid.
Comment #7
liquidcms commented2.14 to 2.15 went more or less seamless.. except for a few composer cliches with other contrib modules being updated that i would have rather weren't
but after that was sorted out... composer require drupal/composer:2.17 followed by drush updb, then cr - went without a hitch... awesome!!
now to see if any of the commerce checkout issues have been sorted out.. :)
Comment #8
liquidcms commentedhmm.. wanted to change status of this case.. and save bojanz some work.. but seems i have no access to do that.
Comment #9
the_glitch commentedI had the same problem being stuck on v2.16.
I seem to have overcome this issue by manually downloading v2.19 and on Mac OSX copying the folder into the modules/contrib folder manually and selecting 'Merge' with existing folder. Then run "composer update drupal/commerce" and "drush updb" for good measure.
Comment #10
mglamanPlease see our guide for upgrading Commerce: https://docs.drupalcommerce.org/commerce2/developer-guide/install-update...
For Composer you need:
This is due to the packaging issue reported in #2948861: Change submodule metadata to use "^maj" instead of 'self.version'