Comments

hedac’s picture

I don't know... Sometimes I get the message appearing in another tab when I go to another tab and browse for another page, then the message appears in the new page even if the command for that message was initiated in another tab.

mstrelan’s picture

Version: 6.14 » 8.x-dev
Component: other » user interface text
StatusFileSize
new22.33 KB

This is still an issue in Drupal 7 and 8.

bdlangton’s picture

Status: Active » Closed (cannot reproduce)

The "Operating in maintenance mode" message is specifically suppressed from showing on the Maintenance Mode admin page in D7 and D8 (code). I'm not sure how you got that on the screenshot unless you are using an older version. Anyways, this is no longer a problem in D7 and D8, as all it will say when updating to offline or online is "The configuration options have been saved."

mstrelan’s picture

Status: Closed (cannot reproduce) » Active

This issue seems to only occur when the admin_menu module is installed. Can be reproduced on a fresh D8 installation with latest admin_menu dev, but still occurs on D7.

With admin_menu installed follow these steps.

  1. Head to the maintenance mode configuration page.
  2. Check "Put site into maintenance mode" and hit save. It should say "The configuration options have been saved."
  3. Refresh the page. No messages appear
  4. Refresh the page again. Messages now says "Operating in maintenance mode. Go online."
  5. Uncheck "Put the site into maintenance mode" and hit save. Messages now say "Operating in maintenance mode. Go online.
    The configuration options have been saved.

Probably an admin_menu issue?

rszrama’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB

Admin Menu is a red herring. The _menu_site_is_offline() function adds the message on any page other than admin/config/development/maintenance, so when the Toolbar module loads a subtree (or any other module executes an AJAX request on the maintenance configuration page) it will still result in the message being shown.

Honestly, I don't think the exemption really matters, and ultimately this function is doing too many things. It purports to check if the site is in fact offline for the current user but also handles displaying interface text. That's a whole separate problem, though. The patch attached is weak, because it only adds an exemption for toolbar/subtrees/* requests, not catching any other AJAX requests that might occur on the page.

Ultimate fix may be to move this drupal_set_message() code entirely out of _menu_site_is_offline(). I just don't know if there is another pertinent place for it.

Status: Needs review » Needs work

The last submitted patch, 5: 585268.maintenance_mode_message_exceptions.patch, failed testing.

alx_benjamin’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.34 KB

This patch should fix this.
-------------------------------------------------
Sponsored by http://reallifedesign.co.uk/

koence’s picture

Status: Needs review » Reviewed & tested by the community

When the site is put in maintenance mode, the message that is set afterwards is 'The configuration options have been saved.'
Refreshing the config page does not show the message 'Operating in maintenance mode. Go online.'

Visiting any other pages on the site in maintenance mode shows the appropriate 'Operating in maintenance mode. Go online.' message.

Going back to the config page and unchecking the 'put in maintenance mode' checkbox, returns the 'The configuration options have been saved.' message.
Visiting any other page does not return the 'Operating in maintenance mode. Go online.' message.

I believe this patch fixes the initial issue.

webchick’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Seems like it ought to be possible to add a small automated test for this.

alx_benjamin’s picture

:) I'll do the test :)

-------------------------------------------------
Sponsored by http://reallifedesign.co.uk/

alx_benjamin’s picture

Status: Needs work » Needs review
StatusFileSize
new3.1 KB

Here is the same patch with test in the same patch file
-------------------------------------------------
Sponsored by http://reallifedesign.co.uk/

koence’s picture

Status: Needs review » Needs work

Nice! Can you also add a test only (= failing) patch?

alx_benjamin’s picture

Can no longer replicate the issue.

Please see if maybe you can.

-------------------------------------------------
Sponsored by http://reallifedesign.co.uk/

alx_benjamin’s picture

Status: Needs work » Closed (cannot reproduce)

Closing as I cannot reproduce the issue any more
-------------------------------------------------
Sponsored by http://reallifedesign.co.uk/