- Issue created by @joachim
If theme 'current' has base_theme 'parent', and 'parent' has base_theme 'ancestor', and ancestor doesn't exist, then the extension system crashes with:
[error] Error: Attempt to modify property "sub_themes" on null in Drupal\Core\Extension\ThemeExtensionList->fillInSubThemeData() (line 189 of core/lib/Drupal/Core/Extension/ThemeExtensionList.php) #0 /core/lib/Drupal/Core/Extension/ThemeExtensionList.php(143): Drupal\Core\Extension\ThemeExtensionList->fillInSubThemeData(Array, Array)
#1 core/lib/Drupal/Core/Extension/ExtensionList.php(282): Drupal\Core\Extension\ThemeExtensionList->doList()
doGetBaseThemes() appears to be checking for this:
// Does the base theme exist?
if (!isset($themes[$base_key])) {
return [$base_key => NULL];
}
but I wonder if the problem arises when the themes are processed in a particular order, as in the case of my themes, alphabetical order of their names meant they would be processed in the order:
- current
- parent
- ancestor