Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After installing D8 and a subfolder, I received the message that the database was outdated.
After I did the database update, the site entered in maintenance mode.
How to solve this?
Comment | File | Size | Author |
---|---|---|---|
#22 | maintenance_mode_after_database_update-2435135-22-test.patch | 1.19 KB | wuinfo - Bill Wu |
| |||
#18 | Screen Shot 2015-03-11 at 21.06.22.png | 59.65 KB | Anonymous (not verified) |
#17 | 2435135-16.patch | 970 bytes | adrianpintilie |
Comments
Comment #1
rogeriodec CreditAttribution: rogeriodec commentedCould anyone tell me how to skip the maintenance mode in D8?
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedYou can toggle the maintenance mode in the form found on "/admin/config/development/maintenance".
Comment #3
dawehnerInteresting, there is code inside
DbUpdateController::triggerBatch
andDbUpdateController::batchFinished
to ensure that we go online afterwards.
This sounds like a bug, indeed, but I haven't manually tried it.
Comment #4
adrianpintilie CreditAttribution: adrianpintilie commentedI am able to replicate the issue with beta7 and minimal installation profile
Comment #5
adrianpintilie CreditAttribution: adrianpintilie commentedI found the issue, writing the patch.
Comment #6
adrianpintilie CreditAttribution: adrianpintilie commentedUpdated the _SESSION variable so the unset from maintenance mode works. There is only one inconvenient left, the "Operation in maintenance mode" is set before and thus displayed at the end.
Comment #7
adrianpintilie CreditAttribution: adrianpintilie commentedUpdated the patch to clear the Operation in maintenance mode message from the message queue.
Comment #12
adrianpintilie CreditAttribution: adrianpintilie commentedIssue with spacing solved in the patch.
Comment #13
adrianpintilie CreditAttribution: adrianpintilie commentedSpacing fixed.
Comment #15
adrianpintilie CreditAttribution: adrianpintilie commentedSent for retesting again. Found that the issue had bad settings in Component & Version.
Comment #17
adrianpintilie CreditAttribution: adrianpintilie commentedUpdated the patch to add a message that states operating in maintenance mode is finished (current state). In this way, the user doesn't see the message of the previous state.
Comment #18
Anonymous (not verified) CreditAttribution: Anonymous commentedI was able to reproduce this issue on 8.0.x with minimal install profile and then executing /update.php/.
I tested this manually. The patch fixes the issue by making the site operate in normal mode after the update. However, I get two contradictory messages: one that states that we are operating in maintenance mode, and one that states that we are operating in normal mode.
As for the patch:
This would need a space in the beginning of the sentence. However, I'm not sure if a comment is needed here. The drupal_set_message() is kind of self-explanatory.
I also looked at the test failure in #15, but I'm not sure how this patch would cause this.
Comment #19
Anonymous (not verified) CreditAttribution: Anonymous commentedAlso, since this is currently not detected by a test, we are missing coverage.
Comment #20
adrianpintilie CreditAttribution: adrianpintilie commentedI tried removing the message list with type "status" but it failed on testing. I thought adding another message would solve the issue. Other ideas?
Comment #21
adrianpintilie CreditAttribution: adrianpintilie commentedWe can also leave the site in maintenance mode. At least they will control to get it online.
Comment #22
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu at Wulei Info Technology Solutions for Corus Entertainment commentedHere is the test script. So, what I did on the test script is adding a maintenance status check at beginning and end of the database update. If it is not equal of those two statuses, throw an error.
Comment #24
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu commentedSo, the test patch failed which means it is good. :)
Comment #25
pwolanin CreditAttribution: pwolanin as a volunteer commentedI'd like to combine this test with my fix at #2538274: DbUpdateController has broken mainteneance mode logic, and update.php doesn't run due to aggregated JS assets since the actual issue I'm trying to solve requires maintenance mode to work right during updates
Comment #26
pwolanin CreditAttribution: pwolanin as a volunteer commented@wuinfo please comment on #2538274: DbUpdateController has broken mainteneance mode logic, and update.php doesn't run due to aggregated JS assets and continue the discussion there.
Comment #28
Mile23#2538274: DbUpdateController has broken mainteneance mode logic, and update.php doesn't run due to aggregated JS assets seems to add the test from #22 and is now passing, so I feel safe marking this issue as a duplicate.
Please re-open if this is not the case.