Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293248

Theme .info.yml file changes are not picked up even after clearing cache or running rebuild.php

$
0
0

Drupal 8 no longer detects changes to either the set of regions of a theme or simply name changes after a cache clear; this information is stored in State and unfortunately only updated when either a theme is disabled or enabled, or a module is installed or uninstalled.

This is a terrible Themer Experience. It's also a regression compared to Drupal 7, where I was able to have the changes be detected by simply clearing all caches.

I propose a simple solution: refreshing this info whenever saving a theme's configuration. Adding the following snippet to ThemeSettingsForm::submitForm() fixes the problem:

    // Also refresh the theme info, to ensure new or modified regions are detected.
    \Drupal::service('theme_handler')->refreshInfo();

Viewing all articles
Browse latest Browse all 293248

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>