Missing or Invalid Theme Error

Created on 23 February 2023, over 1 year ago
Updated 24 February 2023, over 1 year ago

Problem/Motivation

When installing, then removing the Material Base theme using composer, after removal a missing or invalid theme error is present

The following themes are marked as installed in the core.extension configuration, but they are missing:
material_stable9
material_base
material_base_mdc

Steps to reproduce

composer require 'drupal/material_base:^2.0'
composer remove 'drupal/material_base'
View the site's Status Report (/admin/reports/status) to see the warning

πŸ› Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States craigkendall

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

Comments & Activities

  • Issue created by @craigkendall
  • Status changed to Closed: works as designed over 1 year ago
  • πŸ‡¬πŸ‡ͺGeorgia iamdroid

    Hi @craigkendall, thanks for reporting this.

    Downloading themes (or modules) by Composer doesn't automatically install them. And removing themes by Composer doesn't automatically uninstall them from Drupal as well.
    What put these themes to core.extension is not a Composer but Install (or Install and set as default) action on the Appearance page (or enabling theme by Drush).
    To get rid of unnecessary themes you have to do Uninstall action on the Appearance page (or do it by Drush) before removing the theme by Composer.
    The same way as any other theme, by the way.

    But you are absolutely right regarding material_stable9, this theme is hidden and can't be uninstalled from the Appearance page. To uninstall this theme you either have to remove hidden: true property from material_base/themes/material_stable9/material_stable9.info.yml to make it visible on the Appearance page or uninstall it by Drush: drush theme-uninstall material_stable9. This bit is not yet documented anywhere because I still have doubts regarding using own instance of the Stable 9 theme, it may be subject to change.

  • πŸ‡ΊπŸ‡ΈUnited States craigkendall

    You are of course correct. Thanks! Issue resolved.

Production build 0.69.0 2024