Problem/Motivation
Getting the latest version with in-place update of drupal core doesn't work currently. This is the link path: automatic_updates/in-place-update/drupal/core/8.7.4/8.8.0-beta1?token=38xjH0NED2qiSJcUtg0KDjh9BO4Aq1-BbfdxXNm3NwE
If I run the update, I get this message The website encountered an unexpected error. Please try again later.. Also, the web site doesn't work after this.
On the Update page (admin/reports/updates/update) it states the next possible version as 8.7.9:
Manual updates required
Name Installed version Recommended version
Drupal core (Security update) 8.7.4 8.7.9 (Release notes)
So it looks like it gets a bit too far ahead, and uses 8.8.0-beta1, in stead of 8.7.9. But if I go to update.php and execute the updates, I end up with an actual working Drupal 8.8.0-beta1, which is pretty cool.
Cron-triggered update seems to give the same result, probably for the same reason.
Proposed resolution
Perhaps adding db_update is worth considering at this point? Redirecting the experimental manual method to update.php is another option.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3093861-7.x.txt | 4.58 KB | heddn |
| #11 | interdiff_9-10.txt | 823 bytes | heddn |
| #11 | 3093861-10.patch | 15.77 KB | heddn |
Comments
Comment #2
ressaComment #3
heddnOne thing we can do it make sure it doesn't jump minor (major) point releases from 8.7 to 8.8. This should fix that.
Comment #4
heddnWorking on the possible scenarios and options for running hook_update_N and (in 8.x) hook_post_update_NAME.
Comment #5
heddnHmm, maybe we do 2 toggles with #states that enables the second.
Setting 1) run db updates (yes/no, default yes)
Setting 2) if no db updates, put site in maintenance mode (yes/no, default no)
Comment #6
ressaI have just tried patch in #3, and it works perfectly, suggesting an update inside the proper release range, from 8.7.4 to 8.7.9, which went through flawlessly.
The db update logic you outline in #4 and #5 sounds reasonable.
Comment #7
heddnComment #8
heddnFor posterity sake, commenting that until we have A/B installs of the site, I don't think we can really easily decide if a code upgrade has an update hook that needs to be fired. Not in a non-brittle manner.
Comment #9
heddnHere we add some tests and some other clean-up. Let's punt the db update stuffs to a follow-up.
Comment #10
heddnI've added #3093993: Add options to handle database updates
Comment #11
heddnComment #12
heddn7.x backport
Comment #13
ressaThanks, patch from #11 works fine (Drupal 8).
Comment #14
ressaDrupal 7 patch from #12 also works fine, I just upgraded from 7.61 to 7.67.
PS. Commands for Lando testing:
Comment #17
heddn@ressa thank you SO much for doing some manual testing. Committed and pushed to 8.x and 7.x.
Comment #18
ressaNo problem @heddn, I am only glad to help this project along any way I can. Thank you for all the great work you are doing on Automatic Updates, it will play a really important role in making Drupal a feasible CMS choice again for projects with limited resources.
Comment #19
heddn