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.
Enabling "Aggregate and compress CSS files" with skinr module breaks all theming. I confirmed that this was the problem by disabling the module and the theming was back.
I've looked in the issue queue for an answer to this. As far as I know there seem to be similar reports for this issue, but so far no adequate response.
Comment | File | Size | Author |
---|---|---|---|
#6 | skinr-includes_with_aggregation-1717340-6.patch | 6.67 KB | moonray |
Comments
Comment #1
moonray CreditAttribution: moonray commentedCan you try adding
'preprocess' = FALSE
option (see drupal_add_css) to your skin'sattached
option? If that fixes the issue I'll know better how to proceed.Comment #2
mfoda CreditAttribution: mfoda commentedThanks moonray! Changing line 2897 in includes/common.inc to 'False' displayed the theme unbroken with the "Aggregate and compress CSS files" option enabled.
What exactly is this changing? And what does that mean in terms of performance?
Comment #3
moonray CreditAttribution: moonray commentedI wasn't actually suggesting you hack core. You can set the preprocess option for each CSS stylesheet you add in your skin plugin.
What setting preprocess to FALSE does is tell Drupal not to include that CSS file in the aggregated file (because it doesn't appear on all pages).
We should probably set this to FALSE by default on all CSS added by Skinr, but allow the user to override it to TRUE in the skin plugin.
Comment #4
Taxoman CreditAttribution: Taxoman commented#3: "allow the user to override it to TRUE in the skin plugin".
- that sounds like a good solution.
Comment #5
moonray CreditAttribution: moonray commentedComment #6
moonray CreditAttribution: moonray commentedAttached patch fixes this issue by setting
'preprocess' = FALSE
for each JS and CSS file. It can obviously be overridden in the skin info definition. It includes tests.Comment #7
moonray CreditAttribution: moonray commentedComment #8
moonray CreditAttribution: moonray commentedCommitted.