Problem/Motivation

When maintenance mode is active, the site maintenance message is renderen in a particular theme. That theme can be set explicitly in setings.php otherwise the default theme is used. If something goes wrong, however, when determining the default theme, for example because the database goes away during an update, we need some fallback theme to display the maintenance message.

This (last-resort) fallback theme is currently Bartik. As part of the effort to make Claro the default admin theme and eventually deprecate Batrik we should also change this fallback theme to Claro instead.

Steps to reproduce

  1. Change the default theme to something other than Bartik.
  2. Activate maintenance mode and somehow trigger an exception during the fetching of the default theme. You can do this by editing core/includes/theme.maintenance.inc and adding throw new \Exception('my exception'); at line 44 (inside the try block).
  3. You will see the maintenance message rendered in Bartik.

Proposed resolution

Change the fallback to Claro.

Remaining tasks

User interface changes

The fallback site maintenance message is rendered in Claro.

API changes

-

Data model changes

-

Release notes snippet

Comments

tstoeckler created an issue. See original summary.

tstoeckler’s picture

Status: Active » Postponed
StatusFileSize
new3.24 KB

Marked this postponed as I assume we want to do this after #3219959: Update standard profile so Olivero is the default theme but this could in principle be done at any time. We just have to remove the @todo-hunk added here for now to make the test pass.

One note: The test would have passed even without changing the markup assertion, because both Bartik and Olivero put the maintenance message in an element that matches "main h1". But to make the test a bit more meaningful I thought it makes sense to assert for some markup that is Olivero-specific.

tstoeckler’s picture

Status: Postponed » Needs review
tstoeckler’s picture

Status: Needs review » Postponed
tstoeckler’s picture

Status: Postponed » Needs review
StatusFileSize
new422 bytes
new3.65 KB

Weird, had that locally at some point but must have gotten lost. Neat that our test suite catches this, though 👍

tstoeckler’s picture

Status: Needs review » Postponed
quietone’s picture

Status: Postponed » Needs review
Parent issue: » #3278213: [Meta] Tasks to deprecate Bartik

Adding a parent.
And no longer postponed.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

lauriii’s picture

I think we should consider whether it makes sense to use Olivero as the fallback maintenance theme. Olivero provides a much more opinionated experience compared to Bartik, which might not fit in for all sites. It makes sense to provide this opinionated experience when using Olivero, but this simply doesn't fit in as well to use with other themes.

Olivero:

Bartik:

I think we could get an experience closer matching the old behavior if we enabled Claro as the fallback maintenance theme. The Claro designs are also more neutral which has a better chance of fitting into the sites brand.

Claro:

lauriii’s picture

Title: [PP-1] Use Olivero instead of Bartik as fallback maintenance theme » Use Olivero instead of Bartik as fallback maintenance theme
Issue tags: +Needs product manager review

Tagging for product manager feedback on #9.

gábor hojtsy’s picture

Title: Use Olivero instead of Bartik as fallback maintenance theme » Use Claro instead of Bartik as fallback maintenance theme
Status: Needs review » Needs work
Issue tags: -Needs product manager review

I think being in maintenance mode is a backend situation either way, so showing the backend a bit is not bad, especially as a super last resotrt like here. If the database went away, etc. we don't know if Olivero is even enabled or used, so we can't programatically decide if showing that would make sense. However Claro's maintenance experience is more restraied and generally applicable indeed.

ravi.shankar’s picture

StatusFileSize
new3.05 KB
new2.02 KB

Added a patch for Drupal 9.5.x, as patch #5 is not applied to 9.5.x., still needs work for #11.

cindytwilliams’s picture

Status: Needs work » Needs review
StatusFileSize
new3.04 KB
new1.99 KB

Here is a patch that addresses #11 and updates the patch to use Claro as the fallback maintenance theme instead of Olivero.

mherchel’s picture

Issue summary: View changes

Editing issue summary

mherchel’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new14.56 KB

This patch in #13 looks perfect to me. Thanks @cindytwilliams!

Before screenshot

mherchel’s picture

StatusFileSize
new41.86 KB

After picture:

lauriii’s picture

StatusFileSize
new1.98 KB
new1.06 KB

Reverted the changes to \Drupal\Tests\system\Functional\System\SiteMaintenanceTest because I don't think the changes there were doing what they were originally intended to do.

  • lauriii committed 047faa3 on 10.1.x
    Issue #3262674 by tstoeckler, lauriii, cindytwilliams, mherchel, Gábor...

  • lauriii committed 6e09571 on 10.0.x
    Issue #3262674 by tstoeckler, lauriii, cindytwilliams, mherchel, Gábor...

  • lauriii committed 18b725e on 9.5.x
    Issue #3262674 by tstoeckler, lauriii, cindytwilliams, mherchel, Gábor...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committing my own patch since the changes were very minor, and essentially just reverted changes from a test.

Committed 047faa3 and pushed to 10.1.x. Cherry-picked to 10.0.x and 9.5.x. Thanks!

Status: Fixed » Closed (fixed)

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