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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moonray’s picture

Can you try adding 'preprocess' = FALSE option (see drupal_add_css) to your skin's attached option? If that fixes the issue I'll know better how to proceed.

mfoda’s picture

Thanks 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?

moonray’s picture

I 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.

Taxoman’s picture

Version: 7.x-2.0-beta1 » 7.x-2.x-dev

#3: "allow the user to override it to TRUE in the skin plugin".
- that sounds like a good solution.

moonray’s picture

Status: Active » Needs work
moonray’s picture

Title: Does not work when "Aggregate and compress CSS files" is enabled » CSS and JS files not included when 'Aggregate and compress CSS files' is enabled
FileSize
6.67 KB

Attached 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.

moonray’s picture

Status: Needs work » Needs review
moonray’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.