Bootstrap ignores external config changes until cache is cleared

Created on 14 November 2017, over 6 years ago
Updated 30 October 2023, 8 months ago

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.

πŸ› Bug report
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom AdamPS

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024