Bala,
Sorry it's taken me a while to get around to testing your inheritance fix for scripts and css #642058: Javascript added through Skinr is not inherited. I tried it out with Acquia Prosper and some inherited javascript from Fusion Skinr styles, but it didn't insert the script.
Unless I'm missing something, it looks like you define $themes in skinr_preprocess() as an array with just the current theme, and I don't see anywhere where possible base themes get added to that array. Then $themes is passed to _skinr_add_file() to check for inherited scripts and css. But since the only theme passed to it is the current theme, it doesn't loop through any possible base themes in looking for the script.
Instead of $themes = array($current_theme); (line 288 in skinr.module), I tried the following two lines (based on John Albin's recent patch #489762: Add theme lineage to .info cache (and prevent WSOD on admin/build/themes)) and it appeared to insert javascript from the base theme correctly, though I haven't tested it extensively:
$themes = array_keys(system_find_base_themes(system_theme_data(), $current_theme)); // gets any base themes
$themes[] = $current_theme; // adds the current theme to the end of the list
Thanks.
Comments
Comment #1
jacineComment #2
moonray commentedCommitted.
Comment #3
sociotech commentedmoonray,
Thanks for getting to this fix in so quickly!
I noticed it got applied to the 6.x-2.x-dev branch, but not the 6.x-1.x-dev branch. Is this because the 2.x branch will be the recommended branch in the next release (i.e., the 1.x branch is dead)?
If not (that is, if there's going to be more 1.x releases), could you add this fix to the 1.x branch as well?
Thanks again :)
Comment #4
moonray commentedNeeds to be ported to 6.x-1.x branch.
Comment #5
jacineCommitted to CVS. @sociotech Can you please confirm that this is all good before I release?
Comment #6
sociotech commentedJacine,
There is indeed an issue with the patch because it's using system_theme_data(), which is causing dblog errors about duplicate entries.
I've created a patch against v1.4 that should fix it though.
Unfortunately I created a whole new issue (#717644: Another system_theme_data() issue in v1.4 w/ PATCH) rather than just posting it in here :P Sorry about that. Feel free to close that issue and move the patch here.
Thanks.
Comment #7
jacineComment #8
jacineMarking this one duplicate since the issue here is better: #717644: Another system_theme_data() issue in v1.4 w/ PATCH