After upgrading the site to version 9.5.0, the following warning appeared in the site's Status report:

Deprecated themes enabled
Deprecated themes found: Classy, Stable.

My site is using Olivero as its default theme and Claro as the administration theme. No other themes appear as "Installed" when I look at the "Appearance" page. The themes Classy and Stable does not even appear on that page.

There is a documentation page about Deprecated and obsolete modules and themes, but it just say that they are deprecated and suggests that one should use Starterkit theme generator instead. It doesn't tell one how to disable them.

I suspect that the reason I get this is that Bootstrap5 version 2.0.5 in the past was installed as the default theme, but it is no longer installed now.

How can I uninstall or disable Classy and Stable, so that the warning goes away?

Comments

slewazimuth’s picture

After going to the appearance menu and making sure the themes Classy and Stable are uninstalled, then go to the core folder and go to themes. Select Classy and Stable then choose Delete.

desierto’s picture

I have the same issue on all of my Drupal 9.5 sites. These themes are in core. They are not listed under Appearance and thus cannot be uninstalled from the front end. What is the appropriate way to uninstall them? I presume we wait for a core update (Drupal 10) that will remove the actual files from core?

In my particular situation, on some sites, my Bootstrap 5 theme apparently requires Classy.

gisle’s picture

This requirement has been removed from the the 3.x branch of Bootstrap5, see this issue: https://www.drupal.org/project/bootstrap5/issues/3314491

However, using the 3.x branch doesn't solve the problem. Drupal still complains about these being enabled if your site at one point has had the 2.x branch of Bootstrap5 installed.

Waiting from them to be physically removed from the code base when you upgrade the site to Drupal 10 is probably not help much. As long as they are part of your site's configuration (retained in the database), core is going to be extremely unhappy about them missing from the code base.

- gisle

drupalnesia’s picture

There are too many comments to this issue but the simplest way is:

1. edit core/themes/classy.info.yml

2. change "hidden: true" to "hidden: false"

3. the Classy theme appear now on Appearance menu, just Uninstall it.

gisle’s picture

slewazimuth, I don't think any part of your reply makes sense.

You first write:

After going to the appearance menu and making sure the themes Classy and Stable are uninstalled,

It is impossible to do this.

I wrote in my OP: "The themes Classy and Stable does not even appear on that page." You seem to have overlooked this. To spell it out: If I navigate to "Appearance" page from the administrative menu …

… under "Installed themes", I see:

  • Olivero 9.5.0 (default theme)
  • Claro 9.5.0 (administration theme)

… and under "Uninstalled themes", I see:

  • Bartik 9.5.0 (Deprecated)
  • Seven 9.5.0 (Deprecated)
  • Stark 9.5.0

The themes Classy and Stable are not listed.

Then you suggest removing these themes from the core code base. This is bad advice. 1) They will be back on the next update of core on the 9.x branch. 2) If you remove them without uninstalling them first, you'll trigger the following error:

Missing or invalid themes
The following themes are marked as installed in the core.extension configuration, but they are missing:

  • stable
  • classy

Upgrading the site to Drupal 10 (where they are removed from code base), triggers the same error.

Having the warning about having them enabled doesn't hurt much, but if no solution can be found, this is going to break a site if it is upgraded to Drupal 10 without disabling these deprecated themes.

- gisle

Jaypan’s picture

Check if the theme you are using is using either classy or stable as a base theme. You can do this by looking at [THEME].info.yml in the active theme, and looking at the base theme key (if it is set).

gisle’s picture

As already stated, I am only using two themes on my website: Olivero and Claro. For both, the key base theme in the .info.yml file is set to "false".

I believe the problem is caused by the fact that in the past, I have used some theme that used these as a base theme. This is no longer the case, but uninstalling the theme that used these as a base theme does not change their status as "enabled".

The problem only appears on legacy websites upgraded to Drupal 9.5.0. Brand new sites that is installed with Drupal 9.5.0 are not affected.

- gisle

Jaypan’s picture

That makes sense.

There is a way of deleting rows in the DB to deal with this, but it's a bit sketchy. I'd probably do the following in this instance:

1) Download a copy of Drupal with these themes in it

2) Copy the themes over to core/themes

3) Manually update the [THEME].info.yml file to be compatible with your version of Drupal

4) Uninstall the themes through the admin interface

5) Delete the theme directories copied in step 2

gisle’s picture

Jaypan,
Drupal version 9.5.0 has these themes in core/themes. None of the themes that ships with core comes with a core_version_requirement key in their .info.yml. That means that points 1-3 in your suggestion is redundant.

However, their .info.yml has this key and value set:

lifecycle: deprecated

This setting is what triggers the warning (as pointed out by MagpieMagic, removing this key removes the warning, but does not solve the problem, it just hides it).

The problem is, I repeat, that these themes cannot be uninstalled or disabled through the admin interface – or by any other means I know of. It is not known how to carry out the action suggested in your step 4.

Step 5 suggests removing them from core. They will of course be back in the next update of the 9.x branch, and I don't think hacking core makes sense.

- gisle

MagpieMagic’s picture

I have the exact same issue with the Status reporting that the two themes Classy and Stable are enabled. While neither is installed nor enabled, it ends up that Stable is a dependency of Classy, and my 3rd party D9 theme was built on the Classy base.
Two things I can add:
1. I successfully just deleted the other uninstalled and deprecated themes that in the core (but I suspect they will return with 9.5.1, just as the removal of deprecated core modules return)
2. I deleted the Stable theme on a development version of my site, received the warning "The following themes are marked as installed in the core.extension configuration, but they are missing" and the warning "stable (Missing) Classy requires this module." I deleted Classy theme and received the warning about the core.extension configuration.
When I restored them to the core/themes directory, the Warnings stopped AND the Status no longer reports "Deprecated themes enabled". I don't understand how that could happen and I haven't been able to duplicate it on any other D 9.5 sites.

MagpieMagic’s picture

It ends up that I restored the Classy and Stable themes from a backup of 9.4.9, and their [theme].info.yml files don't include the lifecycle: deprecated value. And that's why it's not reported in the Status report.

Sorry that this doesn't help YOUR issue. I actually still have a dependency upon these two themes (and you don't).

gisle’s picture

Please see this core bug report: Deprecated themes cannot be disabled on the "Appearance" tab because they are hidden. A workaround has been posted:

A workaround for now is to remove the that line from both core/themes/classy/classy.info.yml and core/themes/stable/stable.info.yml, uninstall them, and put the line back.

- gisle

xeM8VfDh’s picture

thank you! this worked for me too.

arx-e’s picture

Combining instructions in the above comments the procedure* is the following:
* after having updated to Drupal 10.x and Bootstrap5 3.x

  1. Get the two themes from Drupal 9.4.8
  2. Copy the two themes in core/themes
  3. Edit the info.yml file deleting the line "hidden: true"
  4. Uninstall the two themes using Drupal interface at Appearance
  5. Now you can delete the two themes from the core/themes directory and everything should be fine
boinkster’s picture

Another way to achieve this is to edit exported config then re-import:

edit your config/core.extension.yml file and remove the "classy" and "stable" elements under "theme"

then do a "drush cim"

https://www.drupal.org/project/drupal/issues/3328016#comment-14967373

fls’s picture

Hope, it is not all to redundant, but just in case it helps someone experiencing a similar issue with a missing uninstall button for Stable: After following all instructions above, I managed to figure out that a formerly installed subtheme of AT_core still depended on the theme Stable, although it was listed as uninstalled in the Drupal web interface Appearance. Only after uninstalling AT_core once more, but this time with drush (after upgrading to drush 11), the uninstall button for Stable appeared in Appearance. Thanks a lot!

hermann77’s picture

After Upgrade to Drupal 10 I had no chance to uninstall 'stable' theme.

The only solution I found: create a fake theme calling stable. Then, you clear the cache with drush cr and uninstall the theme with drush theme:uninstall stable. The fake theme need only to include stable.info.yml.

interlated’s picture

One of my theme files used stable. 

{% extends "@stable/block/block.html.twig" %}
jayemel’s picture

drush theme:un classy