After installing this and enabling it, I disabled again and as soon as I did that my Drupal 7 site lost all its CSS. The only way to restore my site's CSS is to turn off CSS aggregation. How can I enable CSS aggregation without losing my CSS? It was working fine enabled before installing this module.

Comments

10basetom’s picture

I would like to clarify that the CSS is only missing for the Admin overlay (even after clearing both the Drupal cache and the browser cache).

omercioglu’s picture

You need to manually delete all cached files under the temporary css folder ("sites/default/files/css/" in my case). The module should automatically delete these files when disabled.

jcarnett’s picture

Thanks @omercioglu. I've been personally occupied this last two weeks and missed this post.

I might add the hooks to clear the CSS cache when the module is enabled/disabled even though it doesn't seem like the "right" thing to do. Drupal core already calls drupal_clear_css_cache(), but it's not behaving as expected. I'll have to dig into core a bit more to see what's going on.

bryancasler’s picture

+1 I ran into a couple cases where disabling this module resulted in similar behavior. Basically after I uninstalled the module everything looked ok. However if I re-enabled "Aggregate and compress CSS files." then the whole site would loose it's css. The only way I could get things working again was to use the Development modules "Empty cache" link.

Since this is basically locking you into using the module or loosing CSS aggregation and compression I would throw this tid bit up on the homepage until it gets resolved.

eighthourlunch’s picture

Priority: Normal » Major

Deleting the cache files apparently wasn't enough for me. I'm running the Jackson theme on D7.8. I deleted the cache files manually, but as animelion mentioned, I'm stuck without CSS aggregration and compression until I figure out what's broken. I don't think the 7.x release should be listed as recommended until this is resolved.

I should mention also that when the module was active, it actually increased my page load times.

Rory’s picture

I've been personally occupied this last two weeks and missed this post.

@jcarnett - how dare you have a life. This module needs a maintainer! :-)

when the module was active, it actually increased my page load times.

@eighthourlunch - simply enabling this module may not provide the increase in load times you're expecting. There are a number of factors (e.g. IE browser compatibility) when using Data URIs:
http://drupal.org/node/1405018
http://www.nczonline.net/blog/2009/10/27/data-uris-explained/

Upon experiencing this issue I:
- deleted cache files
- uninstalled CSS Embedded Images module
- cleared caches
- re-enabled CSS Embedded Images module

...and the modules list page (admin overlay) CSS still appears broken, so this looks like a +1 major issue.

Rory’s picture

Version: 7.x-1.1 » 7.x-1.2
bryancasler’s picture

Experienced this again, but not even drush's CC command can get my theme working again.

bryancasler’s picture

Priority: Major » Critical
bryancasler’s picture

Title: Disabled but now my CSS is lost » CSS Agg is completely broken after disabling the module

DO NOT USE THIS MODULE

I've tried disabling the module, re-enabling the module, uninstalling the module... you name it! I've also cleared the cache using drush, devel and core's built in options. The end result is that no matter what you do CSS Agg remains broken. Until this is resolved and the module is actively maintained, it should be pulled down.

bryancasler’s picture

jcarnett’s picture

Title: CSS is broken after disabling CSS Embedded Images » CSS Agg is completely broken after disabling the module

@animelion Try clearing the cache by actually deleting the aggregated CSS files yourself. Drupal 7's clear cache button (and drush's cc command, by extension) does not behave like it did in Drupal 6. It no longer deletes aggregated CSS files, at least from what I've seen.

jcarnett’s picture

Title: CSS Agg is completely broken after disabling the module » CSS is broken after disabling CSS Embedded Images
bryancasler’s picture

Title: CSS Agg is completely broken after disabling the module » CSS is broken after disabling CSS Embedded Images

@jcarnett Thanks, I had actually tried exactly that over here (http://drupal.org/node/1135504#comment-5676120) but it was still unsuccessful.

I noticed that the Agg CSS files being used after the module is uninstalled, do not change, even after emptying out "default/files/css". So I searched the DB for any reference to one of the CSS file names and there was only one (http://screensnapr.com/e/djKd6p.png). It's in the Variables table and the (agrcache_css_cache_files) entry.

Not sure if it would help, but here is a pastebin of the blob (http://pastebin.com/raw.php?i=ziVqhyJ3) and here is a pastebin of the CSS filenames being used (http://pastebin.com/raw.php?i=r8jmCKpL).

jcarnett’s picture

If you've disabled CSS Embedded Images, but advagg is still generating incorrect CSS even after deleting the files manually then it sounds like a problem with advagg or the integration from #1078060. @mikeytown2 is going to have to weigh in on the issue, as I know nothing about advagg.

bryancasler’s picture

@jcarnett I'm on D7 and there is no way I could have had AdvAgg installed so I took a look at something else that might be conflicting.

I had "Aggregate cache" installed. I disabled it, uninstalled it and cleared the site cache using the devel module. Everything is working correctly again.

jtbayly’s picture

Big +1 from me.

I don't have the Aggregate cache module installed. Nor do I have the AdvAgg module installed. I've emptied sitename/files/css. If I turn on CSS aggregation, I get no images in my CSS anymore. Flushing all caches does nothing.

So does anybody have another recommendation of something to try? I really need to turn aggregation back on.

Thanks,
-Joseph

P.S. I did have Core Library installed, and I uninstalled it. I also had Speedy installed and uninstalled it.

jtbayly’s picture

For me, this could be related to: #1613386: Can't change caching mode settings under performance

I'm really not sure.

-Joseph

NicoDruif’s picture

Jeez... similar problem here as well! This messes up my day today. I do hope I will be able to fix this. Suggestions are very welcome!

My scenario was:

  • installing the module,
  • enabling the module,
  • turning on caching with css aggregation,
  • (then I found out about a problem with a body background image,)
  • turning off caching,
  • disabling and uninstalling the module,
  • turning on caching again with css aggregation,
  • and no css at all was being loaded for my site anymore... :S
NicoDruif’s picture

Okay, so I manually deleted all the css cache files, but still the admin overlay has no css file when I enable caching again. So, this is terrible. I really think this problem should be mentioned on the module mainpage as a big warning!

I'll try to set back a server back-up now...

demoshane’s picture

I really wish this uninstallation problem to be solved. I decided to give this a try 3 months ago, havent figured how to uninstall it without wrecking whole damn site. In addition this module is a bottleneck based on page load speed waterfall.

Word of warning: Uninstalling module can be problematic.

Edit 09082012:
- overly dramatic formatting
+ less dramatic formatting

:)

jcarnett’s picture

Well that's awfully dramatic, Demoshane.

If you've disabled and uninstalled this module, it's not doing anything any more. Then you should manually delete your aggregated CSS files because Drupal 7 will never delete them for you no matter how many times you click around the admin pages or angrily click the clear cache button. After you've deleted those files, you might as well click the clear cache button to get out some frustration.

If you actually are using D6, aggregated CSS actually gets deleted by Drupal. But, heck, why not be certain? Click that clear cache button again.

If you still have an issue, then it is very unlikely anything to do with this module. If you don't believe me, look at the module code -- it's damn near trivial.

demoshane’s picture

jcarnett: From waterfall pov module is more of bottleneck on loading for some reason. Managed to uninstall it by manually deleting aggregates (Tried this before and it failed).

I agree with dramatic comment but I don't pull back what I said. Uninstalling module is based on luck/searching for way to uninstall via d.o.

NicoDruif’s picture

I want to add that I had no other aggregation modules installed other than core modules. So the problem must originate from this module, right? I had no problems before installing this module. After setting back a server back-up (and thus restoring file system and database to a couple of hours before installing this module) everything worked fine again.

jtbayly’s picture

Component: Code » Documentation

Dear jcarnett,

This module needs a warning on its front page that simply disabling and uninstalling the module will leave the site with no CSS. As it stands, there is *no* documentation that this module behaves completely differently than every other module I've ever used. In other modules, not cleanly uninstalling is a release blocker. That's not to say you *can* make it cleanly uninstall. I don't know if you can or not.

But both the readme and the module main page should absolutely include information about this.

As far as I've gathered, you can't change this adverse behavior. Thus this is not a critical code problem, but a critical documentation problem. If I'm wrong, and it can be fixed in code, then great!

-Joseph

quinns’s picture

I've found this issue as well but in our case at least it appears to be an incompatibility with the Aggregate Cache module. Disabling Aggregate Cache resolved the problem for us.

Jeriatrix’s picture

I had this issue recently and would like to offer a possible temporary fix for those experiencing this issue.

I chose to uninstall this module after discovering that it did not support css3 multi-image backgrounds and ran into the same css problem as everyone else here. After much headache I discovered that at least in my case, I was able to manually empty all of my cache tables through phpmyadmin and re-install the module, afterwhich everything started working normally again. Recaching from the drupal admin pages is NOT sufficient. You need to actually dump the 'cache_' tables. Probably also a good idea to dump other caches such as your browser (could make it appear as though it didn't work when it actually did).

Hope this helps someone. :)

mikeytown2’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Active » Fixed

Fixed this by removing all empty css files when the module is disabled.

Status: Fixed » Closed (fixed)

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