The base theme stable9 is not enabled when updating the theme on Drupal 9.x

Created on 20 May 2023, over 1 year ago
Updated 8 November 2023, about 1 year ago

Problem/Motivation

bulma 1.x-dev has stable9 lisetd as base theme and this throws error - it needs to be corrected to stable, I believe

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

1.0

Component

Bulma framework

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom em-fast1

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

Comments & Activities

  • Issue created by @em-fast1
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom em-fast1

    same goes for current stable - it does not work - and for the same reason

  • First commit to issue fork.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia bharath-kondeti Hyderabad

    Can you please provide reproduction steps. I was able to enable this on Drupal 10 fresh install.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States rymcveigh

    I see the same issue. There appears to be a dependency on the stable9 base theme, that is a contributed theme. But, it is not defined in the composer file for this theme. So, when you install the theme using composer, you will start to see the Base theme stable9 has not been installed. (Drupal\Core\Theme\MissingThemeDependencyException) exception in watchdog.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States rymcveigh

    It looks like the stable9 base theme dependency was added in issue #3162911 โœจ Use stable9 as base theme Fixed

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States rymcveigh
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States rymcveigh

    I was able to resolve this issue on our site by enabling the stable9 theme (which is a hidden theme in the latest version of core) via drush drush theme:enable stable9. I wonder if there is a way to add the stable9 theme as a dependency that will force the stable9 theme to enable when a user upgrades to the latest stable version of the Bulma theme?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States rymcveigh
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mlncn Minneapolis, MN, USA

    Themes cannot have their own update hooks so not sure how to fix it. Hmm maybe there could be a contrib module that every theme depends on? Only just thought of thatโ€” really not clear on how this major issue isn't a solved problem Drupal-wide!

    Anyhow here is is what we have in Drutopia profile's install file:

    /**
     * Uninstall stable (8) theme and install stable9, what Bulma now requires.
     */
    function drutopia_update_9101() {
      /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
      $theme_installer = \Drupal::service('theme_installer');
      $theme_handler = \Drupal::service('theme_handler');
    
      $def_theme = $theme_handler->getDefault();
    
      if (in_array($def_theme, ['octavia', 'bulma', 'camouflage'])) {
        if ($theme_handler->themeExists('classy')) {
          $theme_installer->uninstall(['classy']);
        }
        if ($theme_handler->themeExists('stable')) {
          $theme_installer->uninstall(['stable']);
          $theme_installer->install(['stable9']);
        }
      }
    }
    
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bogdog400

    #8 worked for me. Thx!

Production build 0.71.5 2024