Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When the CSS is changed the file isn't updated, so the changes are never visible. The code that controls loading the CSS file is as follows:
// Check to see if there is any CSS.
if (!empty($panelizer->css)) {
ctools_include('css');
$filename = ctools_css_retrieve($display->cache_key);
if (!$filename) {
$filename = ctools_css_store($display->cache_key, $panelizer->css);
}
drupal_add_css($filename, array('group' => CSS_THEME));
}
Nothing is done when the CSS is changed so once the CSS is loaded the first time it stays that way.
Comment | File | Size | Author |
---|---|---|---|
#6 | panelizer-n2154453-6.patch | 1.06 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaComment #2
DamienMcKennaThis checks if the entity previously had a CSS value saved, if it did it deletes the old file and recreates it. FYI the new CSS file is immediately generated so that other tasks can act upon it during the same page execution, if needed.
Comment #3
DamienMcKennaComment #4
DamienMcKennaComment #5
DamienMcKennaRerolled as there were some changes in those lines in #2181799: Not able to save multiple displays on an entity.
Comment #6
DamienMcKennaImproved the logic so that the file will be deleted if it exists, not just if there was CSS before, and then only recreated if there's still CSS in the updated entity object.
Comment #7
DamienMcKennaCommitted.