Steps to reproduce:

  1. Place site in maintenance mode
  2. In admin/reports/updates/install, install a new module remotely, say http://ftp.drupal.org/files/projects/date-7.x-1.x-dev.tar.gz. (Install method was local file transfer).
  3. Site is taken out of maintenance mode. "Installation was completed successfully. Your site has been taken out of maintenance mode."

I would have expected the site to stay in maintenance mode.

Comments

dww’s picture

Title: Installing Module Takes Site Out of Maintenance Mode » Update manager should not take you out of maintenance mode unless you asked it to
Component: update system » update.module
Issue tags: +Usability

Ugh, this was already reported at both #538660-154: Move update manager upgrade process into new authorize.php file (and make it actually work) and #606190: Fix handling of database schema updates in update manager workflow but was lost in the shuffle of both of the other issues. :( So yeah, let's leave this as a separate issue specifically about maintenance mode so it doesn't get lost this time.

However, before we go changing the workflow too much, we need to get some usability reviews in here.

p.s. I know it's confusing, but "update system" is for update.php and the DB update system. You're talking about the Update manager that checks for available updates to your modules and themes (and can install them for you in D7), which is provided by the "update.module"...

bfroehle’s picture

StatusFileSize
new3.61 KB

I've implemented something similar to the update.php script which does the following:

Store maintenance mode status in $_SESSION['maintenance_mode']. At the end of the update, if we're offline but the previous status stored in $_SESSION['maintenance_mode'] was online, put the site back online.

bfroehle’s picture

Status: Active » Needs review

Oops, setting to Needs Review to trigger the bot.

dww’s picture

Status: Needs review » Needs work
Issue tags: +String freeze

Ugh, sorry I didn't have a chance to review this sooner. :( Hate to do this, but this has a code style bug. I'll quickly re-roll and test now.

dww’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -String freeze
StatusFileSize
new3.94 KB

Okay, this fixes the code style bug. Tested manually, and the patch does what it says. I still think it's stupid to take the site online and then send people to update.php which then suggests the admin go take the site offline again. :( But, I don't think we can make a change that big at this point. We *desperately* need better integration between authorize.php and update.php, but that's obviously for D8 at this point.

But, this is a pretty major bug. If you start the whole update process with your site offline, we currently automatically put it back online right when you don't want it online. That sucks. This fixes it. Let's get this in for D7.

Oh, and I was wrong about the string freeze. We're not changing any strings at all here, I just misread earlier.

bfroehle’s picture

Agreed.

dww’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Usability, -Update manager

The last submitted patch, 976328-5.update-manager-only-online-if-it-started-that-way.patch, failed testing.

bfroehle’s picture

Status: Needs work » Needs review
Issue tags: +Usability, +Update manager

#5: 976328-5.update-manager-only-online-if-it-started-that-way.patch queued for re-testing.

Hmm.. We're failing from
SQLSTATE[08004] [1040] Too many connections
in

Test name	Pass	Fail	Exception
JavaScript (JavaScriptTestCase) [System]	42	1	2
User registration (UserRegistrationTestCase) [User]	105	21	13
User role administration (UserRoleAdminTestCase) [User]	46	10	4

on test client #32.

dww’s picture

Status: Needs review » Reviewed & tested by the community

Bot's happy again...

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Yikes! That's a pretty nasty problem. :\ Thanks for coming up with a non-string-freeze-breaking-fix. Yay. :)

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Usability, -Update manager

Automatically closed -- issue fixed for 2 weeks with no activity.