Closed (won't fix)
Project:
Zen
Version:
6.x-1.0
Component:
Miscellaneous
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2009 at 19:43 UTC
Updated:
19 Oct 2010 at 05:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
gausarts commentedHi,
I run csstidy (http://csstidy.sourceforge.net/) on my local and process css to strip out everything before trying drupal's own optimizer. I want to do it one at a time to avoid problems. To my findings, some of zen css produced strange combination of selectors when optimized and causes the aggregated css to fail.
The solution is to remove aphostrophy symbol (') from any comments in your css.
i'm not sure if you have done this already, but this saves me once.
Comment #2
Noira commentedI have a similar problem. Turning on CSS aggregation feels like the browser ignores the last and most i mportant CSS file. It happens on admin and panel pages in firefox, and all the way in Konqueror.
Is there any code to do one's own aggregation or what shall I do? If I switch it of IE users don't see the style at all because of IE bug!
Comment #3
snorkers commentedThis is a really serious issue... to the point where I may have to migrate to another base theme (or even... develop one entirely from scratch). I haven't tried @gausarts solution - but that is not a long term fix due to the frequency of module updates (I usually have to update 1 or 2 each day, so stripping out all CSS each day is not really feasible)
Even fairly small sites with a modest amount of modules quickly exceed the 30 CSS file limit (even in IE8), so this could be a real killer in pushing Zen to Drupal newcomers. To someone starting out and trying to make their site live the Drupal guidance encourages JS/CSS/page compression on live sites and Zen just cannot handle it.
Comment #4
snorkers commentedJust spent the last couple of days chopping my theme around to use Blueprint as the base theme instead of Zen... Alas, the site crashes with CSS compression enabled too. Only tenuous link, however, is that I'm using a fluid Zen-based subtheme as the Admin theme. However, the odds are that they may some other issue, not just Zen's fault.
Comment #5
johnalbin@Noira, Your issue sounds different than the one described here.
This is not a Zen issue. CSS Aggregation works just fine with Zen.
Which means its something to do with your system. :-( I wish I could give you guys some hints about what might be causing it, but I have no clue. Actually, maybe I do have a hint: turn off "Page compression" on the admin/settings/performance page and see if that fixes the issue; that's just a wild guess.
If you are still having issues with CSS aggregation, you would need to find/post an issue in the main drupal issue queue: http://drupal.org/project/issues/drupal Best of luck!
Comment #6
CPyle commentedI am also having this problem. CSS Aggregation crashes the site when switching to Zen but is fine in Garland and Rootcandy. By "Zen" I mean the Zen base theme.
This happens with or without page caching or compression, and I've tried it on a clean site with virtually nothing else added with the same results. This happens even on 2.x-dev.
Comment #7
FlymastaFlex commentedTry to turn off the trigger module. This solved my problem immediately.
If you need the trigger module, there are other ways... But try this out first.
Comment #8
OldAccount commentedHas anybody had any luck solving this yet? I've tried all the suggestions here and here and still no luck.
Comment #9
OldAccount commentedTry this workaround, worked for me: http://drupal.org/node/331915#comment-1357688
Comment #10
Garrett Albright commentedI too ran into problems with CSS optimization causing PHP to die when Zen-based themes are used. I could never figure it out. I tried tweaking settings, reinstalling Zen, reinstalling Drupal, reinstalling and reconfiguring PHP, reinstalling Lighty… Ultimately I asked my VPS host to completely wipe my VPS (I didn't have anything of import on it yet), then reinstalled everything from scratch, and… it worked. Arbitrary!
So I'm not sure this is an issue with Zen or Drupal. I think it might be a PHP bug. For what it's worth, my web server is communicating with PHP via FastCGI; perhaps that's relevant?
Comment #11
FlymastaFlex commentedDid you tried to turn of the trigger module ?
Comment #12
dicreat commentedI have the same problem with ZEN theme even if I turn off the trigger module.
One solution here http://drupal.org/node/331915#comment-1357688 - if I cut line #1982 in common.inc:
/\*([^*\\\\]|\*(?!/))+\*/ | # Remove comments that are not CSS hacks.CSS optimization works fine, but comments still exists in css-file (not good).
Second solution in #1 - just remove aphostrophy symbol (') from any comments in your css.
Comment #13
David Stosik commentedEdit: Well no, just experiencing the same issue, what I was suggesting is wrong.
Comment #14
donquixote commentedThis problem started with the Zen theme, but now I found it's actually a buggy behavior of Drupal's CSS optimizer.
Attached is a CSS file that let me crash PHP even without the Zen theme, taken from zen-liquid.css. I only need to change little portions of this file to prevent the error from happening.
If you want to reproduce:
- put the css file somewhere in your drupal dir, and include it with drupal_include_css. I did this in my index.php, after the bootstrap.
- enable CSS file optimization (in admin/settings/performance)
- choose any theme, can be Garland.
- make sure that cached CSS files (typically in sites/default/files/css) are deleted before every page request. I added some lines to the index.php to make this happen, but you can just as well delete it by hand each time.
I do not promise that the same results will happen on your system.
Typical error message I get in Firefox (in german):
which means, more or less, "Connection to the server has been reset while loading the page."
There is no error reported in apache's error.log, except for a server restart.
Comment #15
donquixote commentedThis is totally a PHP / PCRE preg_replace bug.
http://drupal.org/node/444228#comment-2089300
EDIT:
No it's not. It's a Drupal core bug: The regex stinks. See the linked issue, and try if the patch does the job.
Comment #16
gausarts commentedUnless you really want to rely on the system, for urgent solution try removing and cleaning all comments from your css with csstidy or something before trying drupal aggregation, see => http://drupal.org/node/448870#comment-1597802. This saves me on production and local.
Comment #17
snorkers commentedI agree with @donquixote that this is not a Zen issue. The various proposed patches to core (latest at #444228-47: Optimize CSS option causes php cgi to segfault in pcre function "match") seem to work, as it sorts out all the file compression problems. If you are up to patching Drupal core, then try it out and report back. For me it's worked and with compression enabled for my Frankenstein monster of a site, the performance has significantly improved.
This issue should no longer be cluttering the Zen theme issue queue.
Comment #18
lelizondo commentedIn my case, I was using a non-zen theme and I had the exact same problem. Duplicating my theme and changing the name solved the problem like black magic. One note, I don't know if it is important: the problematic theme had a 3-letter name, the new theme has a 10-letter name.