Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295043

maintenance-page--offline.html.twig is not picked up when system is offline

$
0
0

Issue

In system_theme_suggestions_maintenance_page(), a template suggestion is provided for maintenance-page--offline.html.twig:

if ($offline) {
  $suggestions[] = 'maintenance_page__offline';
}

However, this template is not picked up when the system is offline. This results in a WSOD, creating a poor user experience. This is functionality that did exist and work in Drupal 7, and an attempt was made to have this functionality ported to Drupal 8, but appears to not have been completed/successful. Therefore this is a bug report.

Steps to reproduce

Situation A (when core/includes/errors.inc is used):

  1. Set correct database credentials in settings.php
  2. Clear cache: drush cr
  3. Set $config['system.logging']['error_level'] = 'hide' in settings.php
  4. Set $settings['maintenance_theme'] = 'bartik' in  settings.php
  5. Set incorrect database credentials in settings.php (for example invalid username)
  6. Refresh the page.
  7. There is a plain text message: "The website encountered an unexpected error. Please try again later."

Situation B (when \Drupal\Core\EventSubscriber\FinalExceptionSubscriber is used):

  1. Make sure that $settings['hash_salt'] in set in settings.php
  2. Clear cache: drush cr
  3. Set $config['system.logging']['error_level'] = 'hide' in settings.php
  4. Set $settings['maintenance_theme'] = 'bartik' in  settings.php
  5. Comment out $settings['hash_salt'] in settings file
  6. Refresh the page.
  7. There is a plain text message: "The website encountered an unexpected error. Please try again later."

Priority Level

From the status description for major issues:

Cause a significant admin- or developer-facing bug with no workaround.

This is a significant bug and there is no workaround at the moment, and therefore is a major issue.


Viewing all articles
Browse latest Browse all 295043

Trending Articles