Base theme classy has not been installed

Created on 19 August 2021, over 3 years ago
Updated 15 August 2024, 4 months ago

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

💬 Support request
Status

Closed: works as designed

Version

9.3

Component
Theme 

Last updated about 20 hours ago

Created by

🇳🇱Netherlands Arthur Sauer Rotterdam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands zJoriz

    Thank you specifically to cilefen: I have to admit that #6 was my problem.
    I set the base theme for Seven to 'stable', then could enter the backend again and install Classy. Then changed the base theme back and we're golden.
    It's always the little things...

Production build 0.71.5 2024