This may be a bug or maybe I am just missing something.

In Drupal generally it can be useful to apply config changes outside of the GUI. These could represent migration of settings from test/staging to live or application of a company-wide policy decision to all sites the company maintains or developer testing/fixing.

An easy way to generate such a change is using drush config-set. If I try this on the Bootstrap theme settings it doesn't seem to work. Drupal has stored a new value, but Bootstrap ignores it:

$ drush cget yw_theme.settings breadcrumb
No matching key found in yw_theme.settings config.  

$ drush cset yw_theme.settings breadcrumb 0
breadcrumb key does not exist in yw_theme.settings config. Do you want to create a new config key? (y/n): y

$ drush cget yw_theme.settings breadcrumb 0
'yw_theme.settings:breadcrumb': '0'

$drush eval "print(Drupal\bootstrap\Bootstrap::getTheme()->getSetting('breadcrumb'));"
1

The GUI still reports 1, and if I save in the GUI, it overwrites the config value back to a 1. It seems that Bootstrap is failing to clear an internal cache when the underlying config is modified externally.

A fix would be great, but if that's not possible, then a workaround would be useful. drush cache-rebuild does fix the problem but it's a rather drastic measure, so it would be useful to know something more specific.

Comments

AdamPS created an issue. See original summary.

markhalliwell’s picture

Title: Bootstrap ignores config changes if not done in GUI? » Bootstrap ignores external config changes until cache is cleared
Version: 8.x-3.x-dev » 8.x-4.x-dev
Category: Support request » Bug report
Priority: Normal » Major
Status: Active » Postponed
Parent issue: » #474684: Allow themes to declare dependencies on modules

It's a bug, one that will likely be tricky to track down and reconcile differences/authority.

Config does dispatch an event when it's saved... but I doubt a theme can respond to it since they can't participate in services like that :-/

$this->eventDispatcher->dispatch(ConfigEvents::SAVE, new ConfigCrudEvent($this));

So it sounds like this will be postponed on #474684: Allow themes to declare dependencies on modules, which probably also means 8.x-4.x.

shelane’s picture

Status: Postponed » Closed (won't fix)

This theme will not be supported for Bootstrap 4. See alternative themes for this support.