On the site maintenance admin screen, after setting the status of an offline site back to "online" and saving the change, the page still displays the "operating in off-line mode" message at the top. It does not display afterwards when moving to display other pages and really is only the display of a wrong status message on the site maintenance admin screen immediately after having validated the change.

Not a big deal, but it has been like that for a few releases now, and I thought I would report this little annoyance at last ;-)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BrightLoudNoise’s picture

Version: 5.3 » 6.x-dev
Assigned: Unassigned » BrightLoudNoise

Currently looking into this, the code that triggers this message is actually in menu.inc.

BrightLoudNoise@drupal.org’s picture

Status: Active » Needs review
FileSize
677 bytes
16.27 KB

Attached is a patch against system.admin.inc that sets a message of "Operating in on-line mode." while system_offline == 0 for the site maintenance form.

I'm wondering if the offline message should be cleared first, as having conflicting messages displayed may be confusing. *Screenshot attached.

catch’s picture

clearing the off-line message would make sense to me. Otherwise at least these are displayed in order, so an admin could work out it was a status change (rather than simply wrong).

BrightLoudNoise’s picture

They way these messages are triggered don't make it very easy to just clear the "off-line" message using get_messages($clear_queue), it also clobbers the "config options have been saved" message as they are both status type messages.

The current patch is an improvement in any case, so if someone could review and approve, that would be great.

RobLoach’s picture

I suggest we hide the message from displaying when they visit admin/settings/site-maintenance. They are already on the site maintenance page, so they already know that it's in offline mode. Why bother displaying the message? This should fix the workflow.

BrightLoudNoise’s picture

Rob, that sounds reasonable to me. Do we need to re-roll these as a single patch to get this RTBC?

RobLoach’s picture

Nope, just review and test the patch I uploaded, and then set to RTBC if it works! ;-)

BrightLoudNoise’s picture

Version: 6.x-dev » 7.x-dev
Status: Needs review » Postponed

Postponed to D7 due to string freeze as of D6 RC1.

Gábor Hojtsy’s picture

Version: 7.x-dev » 6.x-dev
Status: Postponed » Needs review

No string change in the latest patch.

RobLoach’s picture

Title: incorrect message displayed after bringing a site back online » Incorrect message displayed when bringing a site back online
Assigned: BrightLoudNoise » Unassigned
BrightLoudNoise’s picture

Status: Needs review » Needs work

Patch no longer applies due to changes in menu.inc

RobLoach’s picture

Status: Needs work » Needs review
FileSize
874 bytes
BrightLoudNoise’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies cleanly and removes the potentially confusing status message from the site maintenance config page.

Dries’s picture

Status: Reviewed & tested by the community » Needs work

We want to document this in the code, IMO.

Another solution might be to set that status message at a a later point in time. It looks like it might be set to early in the process?

RobLoach’s picture

How's this?

"Ensure that the off-line message is displayed only once [allowing for page redirects]. Also be sure to not display it on the site maintenance page so that it doesn't display it twice."

BrightLoudNoise’s picture

I've taken a stab at cleaning it up a bit

"Ensure that the off-line message is displayed only once [allowing for page redirects], and specifically suppress its display on the site maintenance page."

RobLoach’s picture

Status: Needs work » Needs review
FileSize
977 bytes
RobLoach’s picture

Status: Needs review » Needs work

Needs roll from root.

RobLoach’s picture

Component: system.module » menu system
Status: Needs work » Needs review
FileSize
1.08 KB
coltrane’s picture

#19 patch applies and words correctly. Message is not shown on the site maintenance page.

BrightLoudNoise’s picture

Component: menu system » system.module
Status: Needs review » Reviewed & tested by the community

Great, lets get this in there.

Gábor Hojtsy’s picture

Version: 6.x-dev » 7.x-dev

Great, #19 looks right, so committed that one. Also RTBC for 7.x.

RobLoach’s picture

Status: Reviewed & tested by the community » Needs work

I think we should come up with a better solution for Drupal 7. Dries mentioned that we might be sending out the message a bit early?

Gábor Hojtsy’s picture

Status: Needs work » Reviewed & tested by the community

Rob Loach: first get the patch committed, so Drupal 6 and 7 are not disconnected. Then work from there.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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