an alert message telling that site is off-line and shows a wrong maintenance link
/admin/settings/site-maintenance
instead of :
/admin/config/development/maintenance

the alert message is below :
t is not possible to masquerade in off-line mode as testeditor does not have the use the site in maintenance mode permission. ((((Please set the site status)))) to "online" to masquerade as

Comments

joshi.rohit100’s picture

Status: Active » Needs review
StatusFileSize
new2.32 KB
tinker’s picture

Status: Needs review » Needs work

Patch #1 fixes the redirect URL but does not use the same language as on the maintenance page as there is no longer 'online' and 'offline' options. There is also a problem with the %config-perm not being translated.

tinker’s picture

  • Fix redirect URL (as previous patch)
  • Change text in message to match what is displayed on maintenance page.
  • Translate %config-perm variable
  • Change @site-maintenance to !site-maintenance so that it is not sanitized.
tinker’s picture

Status: Needs work » Needs review
hansfn’s picture

Status: Needs review » Reviewed & tested by the community

Please commit.

izmeez’s picture

This issue #2475897: alert message shows a wrong link for maintenance page overlaps with #2559407: Error message contains link to 404 and both have patches that are RTBC.

Each patch applies to current 1.x-dev.

The patch in this issue includes several lines of code while the patch in #2559407: Error message contains link to 404 changes only one line.

Which approach is better?

izmeez’s picture

Adding related issue.

tinker’s picture

@izmeez,

My patch in this thread does more that just change the URL. It also:
- Fixes terminology from 'online', which is no longer used, and instead uses the exact label that is used next to the checkbox 'Put site into maintenance mode'
- Removes santization on URL which used @site-maintenance to use !site-maintenance. This fixed issues with URL not working when used on site that was installed in sub-directory.
- Finally it uses drupal standards for code and splits the t() array variables onto separate lines for better readability.

So suprise-surprise I vote for my patch.

izmeez’s picture

@tinker comment #8 is just what's needed. Thanks.

izmeez’s picture

In fact when I reviewed this issue I thought it was continuation of work started in the other thread and even the name of the first patch seemed to confirm that.

+1 for patch in #3

ressa’s picture

Status: Reviewed & tested by the community » Closed (outdated)

Thanks everyone for working on this. In an attempt to help the maintainers, I am going through some of the Drupal 7 issues, and closing them, since Drupal 7 is EOL.

Maintainers should grant credit for the great work to the relevant users, even if the patch did not get committed: https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett....

Since Drupal 7 is EOL, we can probably close this issue, but feel free to re-open if this is still a problem in Drupal 11, so we can get it fixed. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.