Problem/Motivation
I'm learning Drupal and reading a book "Handboek Drupal 8" by Maarten de Block.
I followed his instructions on how to custumize a theme.
This does not work because I get an error:
Drupal\Core\Theme\MissingThemeDependencyException: Base theme classy has not been installed. in Drupal\Core\Theme\ThemeInitialization->getActiveThemeByName() (line 122 of core/lib/Drupal/Core/Theme/ThemeInitialization.php)
I know classy is deprecated and a new system is in the make (but not included in 9.2.x).
So classy should still work.
Furthermore I understand that the goal for Drupal 10 is to make Drupal more accessible for novices.
Since there are not many books about Drupal 8 or later, and there is only one book explicitly about theming, and all other books discuss theming by using classy, it is not very helpful if classy was left in a broken state, since there is no alternative at the present, and new books about theming in Drupal 10 might never appear in print...
All this is a very good reason to keep classy in a deprecated state that is still working so novices might get up to speed learning theming.
Furthermore, there is no documentation about how the new system works, nor do I know how to install this new system on top of my current Drupal installation.
Steps to reproduce
In folder /themes/custom/
there is a folder drupalia
In /themes/custom/drupalia
is a file drupalia.info.yml
.
This file containts the following code:
name: Drupalia
core_version_requirement: ^8 || ^9
type: theme
version: 8.x-0.1.0
base theme: classy
libraries:
- drupalia/global-styling
In /themes/custom/drupalia
is also a file drupalia.libraries.yml
.
global-styling:
version: 1.x
css:
base:
css/global-styling.css: {}
In folder /themes/custom/
is a folder css
.
In the folder css
is a file called global-styling.css
.
This file contains the following code:
body{
background: #e6f7ff;
}
Go to /appearance and install this theme and make it default.
Go to /structure/block layout.
Drupalia must be selected in the tabs.
Click on "Demonstrate block regions (Drupalia)"
I get this error:
Drupal\Core\Theme\MissingThemeDependencyException: Base theme classy has not been installed. in Drupal\Core\Theme\ThemeInitialization->getActiveThemeByName() (line 122 of core/lib/Drupal/Core/Theme/ThemeInitialization.php)
Proposed resolution
Tell me if I did something wrong (as a sidenote: the changes between Drupal 8 and 9 I found out by using Google...).
Put back what has been removed in the code that is the cause of classy not working anymore.
Keep classy in a deprecated state until enough learning material is available so that novices can learn theming.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet