After running update.php, the skinr configuration for all blocks in my installation disappears.
I did a bit of digging and found that my theme is not being added to the output of skinr_implements_api(), which is called after Drupal's cache is cleared from within update.php. The incorrect return value is then cached, resulting in a disappearance of theme-introduced skinr styles until the site's cache is manually cleared. It appears that list_themes() returns a list of themes where the current theme is not set to active when invoked in this scope. While this reflects a potential issue in core, a workaround within skinr would be valuable.
I found that the following steps reliably reproduce the problem on my local installation:
- Go to /update.php.
- Attempt to run database updates (no queued updated necessary).
- View any page where skinr styles defined by the theming layer are active.
I have temporarily solved this problem within the theming layer by checking to see if skinr recognizes it, and if not, reseting skinr's cache (see below).
if (module_exists('skinr')){
$skin_info = skinr_get_skin_info();
if (empty($skin_info)){
skinr_cache_reset();
}
}
This solution works, but feels like a hack. I'd like to write a patch to fix this, but I'm not quite sure where to begin - can one of the designers of this module suggest an optimal approach to fix?
Comment | File | Size | Author |
---|---|---|---|
#3 | skinr-theme_skins_disappear-2059029-3.patch | 4.91 KB | moonray |
#2 | skinr-theme_skins_disappear-2059029-2.patch | 613 bytes | moonray |
Comments
Comment #1
moonray CreditAttribution: moonray commentedComment #2
moonray CreditAttribution: moonray commentedThe correct fix is in this patch. I'm trying to figure out if there is a way to test against this before committing it.
Comment #3
moonray CreditAttribution: moonray commentedThe same patch, but with tests.
Comment #5
moonray CreditAttribution: moonray commented