Problem/Motivation

drush bs-tu <theme> runs the pending update hooks on the theme, then updateSassFiles() merges the first parent theme's SASS @import lines into the theme's files unchanged. If the parent theme still has pending update hooks, its old lines return after the hooks rewrote them. The hooks are already recorded as run, so running bs-tu again doesn't fix it.

Seen when moving from bs_base 1.x to 2.x: the site theme was updated before its parent theme, and it kept bs_bootstrap/ paths and Bootstrap 4 imports.

Proposed resolution

In themeUpdate(), before any hook runs, check each parent theme with getUpdateHooks(). If one has pending updates, stop with an error that lists them, for example: Parent theme mp_theme has pending updates (syml_theme 8005). Run `drush bs-tu mp_theme` first.

Issue fork bs_lib-3626600

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pivica created an issue. See original summary.

  • pivica committed 20b007cc on 2.0.x
    fix: #3626600 bs-tu copies an outdated parent theme's SASS imports
    
pivica’s picture

Status: Active » Fixed

Done.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.