diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index b98d28a..6224854 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -82,19 +82,19 @@ function _drupal_maintenance_theme() { $theme = $custom_theme; // Find all our ancestor themes and put them in an array. - $base_theme = array(); + $base_themes = array(); $ancestor = $theme; while ($ancestor && isset($themes[$ancestor]->base_theme)) { - $base_theme[] = $themes[$themes[$ancestor]->base_theme]; + $base_themes[] = $themes[$themes[$ancestor]->base_theme]; $ancestor = $themes[$ancestor]->base_theme; if ($ancestor) { - // Ensure that the base theme is added. + // Ensure that the base theme is added and installed. $theme_handler->addTheme($themes[$ancestor]); } } // @todo This is just a workaround. Find a better way how to handle themes // on maintenance pages, see https://www.drupal.org/node/2322619. - \Drupal::theme()->setActiveTheme($theme_init->getActiveTheme($themes[$custom_theme], array_reverse($base_theme))); + \Drupal::theme()->setActiveTheme($theme_init->getActiveTheme($themes[$custom_theme], $base_themes)); // Prime the theme registry. Drupal::service('theme.registry'); } diff --git a/core/lib/Drupal/Core/Theme/ThemeInitializationInterface.php b/core/lib/Drupal/Core/Theme/ThemeInitializationInterface.php index cd5c1be..a3b54df 100644 --- a/core/lib/Drupal/Core/Theme/ThemeInitializationInterface.php +++ b/core/lib/Drupal/Core/Theme/ThemeInitializationInterface.php @@ -57,8 +57,8 @@ public function loadActiveTheme(ActiveTheme $active_theme); * @param \Drupal\Core\Extension\Extension $theme * The theme extension object. * @param \Drupal\Core\Extension\Extension[] $base_themes - * An array of extension objects of base theme and its bases. It is ordered - * by 'oldest first', meaning the top level of the chain will be first. + * An array of extension objects of base theme and its bases. It is ordered + * by 'next parent first', meaning the top level of the chain will be first. * * @return \Drupal\Core\Theme\ActiveTheme * The active theme instance for the passed in $theme.