css aggregation issues
i enabled CSS Aggregation/Optimization under Performance, and it wasn't working (site was showing up as one long column without any regions and I was getting messages in my log like "warning: sites/default/files/css/0e5857918b384cdcbcd471c4b4df50a4.css not found").
i disabled CSS Aggregation/Optimization, deleted /sites/default/files/css and re-enabled CSS Aggregation/Optimization, and everything was working fine with the .css files being written to that folder.
i today cleared my cache and noticed the problem has been back and it's not working again (site being shown as a long column and files not being written) - this happened at some point and i really don't think i did anything to cause it. there are several log entries showing .css files not found.
does anyone know what i can do to get this to consistently work?
i'm confused by the sites/ sites/default/ sites/default/files sites/default/files/css chmod permissions, chown owners (apache:apache? root:root?), but
i deleted the css subdirectory and enabling aggregation caused it to be auto-created, which was what made this work temporarily (i would think they auto-created folder would be just fine since it was for a bit). i swear i didnt touch anything having to do with css, not even style.css
any help would be appreciated.

I experience precisely the
I experience precisely the same and it started only after one of the more recent updates of Drupal itself (I guess somewhere around 6.8 or 6.9 but I cannot pinpoint it.
Basically what happens is that the aggregated CSS file is not built automatically when purged by cron (I have had my caching lifetime set to 3 minutes.
I have now switched off caching but only left CSS aggregation on which makes it a bit less of a problem. Instead of seeing pages with no CSS styling and until a manual intervention is done, the CSS is missing only on occasional basis but goes away once you reload the page.
However: this all means that I cannot use Caching at all anymore.
Just to make sure that the files directory is always writable I have added a cron job to do a chown -R 777 on that folder every 5 minutes.
I suspect the error to be somewhere in includes/common.inc which issues the command to write that CSS file.
Steph
This problem is driving me
This problem is driving me nuts. It seems so random. The html contains a reference to a css file that doesn't exist... It seems that the css in the css directory is getting regenerated, but the html that is output isn't updated to reflect this. A subsequent reload of the page clears the issue 95% of the time.
--
Tom
kirkdesigns.co.uk - web design and development
solution?
Does anybody know a solution yet for this problem?
I seem to have tried everything. My aggregated CSS file gets instantly deleted upon creation (when turning on CSS optimization), the CSS folder and the file are both created by Drupal but seem to get flushed upon the first page load.
Is this a bug?
I just wanted to add mine
I just wanted to add mine here as well. I'm getting the same errors. I had to finally shut off Optimize CSS on my custom theme. I've checked over and over my file permissions, but all is correct.
My problem was related to the
My problem was related to the issue I described here #408448: drupal_clear_css_cache in hook_init conflicts with css aggregation. I still haven't got round to testing the latest version of the offending module, but disabling it fixed the issue for me. If you are not using the Role Theme Switcher module, I suggest you scan your installed modules for similar problems (calling drupal_clear_css_cache() in hook_init() in this case).
--
Tom
kirkdesigns.co.uk - web design and development
I gave your suggestion a try,
I gave your suggestion a try, but I couldn't find any occurrences of drupal_clear_css_cache() in any of my installed modules. I guess I'll have to try something else.
What I would do then is try
What I would do then is try adding some debugging statements into drupal_clear_css_cache (http://api.drupal.org/api/function/drupal_clear_css_cache) and/or drupal_flush_all_caches() (http://api.drupal.org/api/function/drupal_flush_all_caches/6) and try and either confirm, or rule out my the issue I had as being the same one you are having. The question is, are these functions getting called on every page run? If so, you need to find out the cause, if not, god only knows!
--
Tom
kirkdesigns.co.uk - web design and development
worth a try?
I had issues with this. What worked for me?
i disabled css aggregation, deleted the css folder that gets auto generated in the files directory, emptied out all the cache tables. then re-enabled and it now works. It seemed the drupal was calling old aggregated files, that it had made before (only on some pages) and I had to manually delete them to make it work.