0

I have CSS\JS Aggregation on, and I've installed the AdvAgg module and set it for Development mode. The site works fine, but now I can't really use Firebug...

Firebug no longer shows me, for example "Style.css, line 50", but rather something like "fdn_jkfdk_aaahjfdh.CSS, line 500". I guess it's the aggregated file...

Anyways, Is there any way to get "Style.css, line#" appearing again without disabling aggregation? I can't sacrifice the option to make CSS edits in the site just for aggregation... I guess no one can!

  • Best practice is to have two environments. One tot development and testing and another one for production. If you enable aggregation on production, you can still read the CSS in development environment. – Neograph734 Feb 9 '15 at 1:49
  • Can you elaborate? Are you talking about Offline and Online environments? If yes, I'm sorry to say it's not good for me because I definitely aspire to do everything online. – JohnDoea Feb 9 '15 at 1:52
  • There is no way to achieve readable CSS after aggregation. It is compressesed and combined. So if you want to have both, human readable CSS and aggregation, you will need to have 2 sites. Can be on a subdomain, offline or whatever. – Neograph734 Feb 9 '15 at 1:55
  • Well, I prefer only one environment... Is there really no easy way to edit the CSS without clearing cache after any small change and without aggregation? – JohnDoea Feb 9 '15 at 2:06
2

Advagg has a built in feature to bypass aggregation for a single request. You can append ?advagg=0 to the query string to load the page without aggregation. I haven't personally used this feature, but it seems it could be useful in your situation.

From the module description:

Url query string to turn off aggregation for that request. ?advagg=0 will turn off file aggregation if the user has the "bypass advanced aggregation" permission. ?advagg=-1 will completely bypass all of Advanced CSS/JS Aggregations modules and submodules.

This would help with your problem of having readable css in firebug, but any changes you make to your sites css would still need a cache clear to take effect.

  • Well, because my only aim is not to clear caches after every css change... I'm guess I should find another solution besides Advagg... The problem is that it seems to me that no such solution exists (at least for "Shared" hosted sites)... Not even CSS registry rebuilding with Devel. – JohnDoea Feb 9 '15 at 2:48
  • 1
    The advagg=0 trick as well as going to the "operations" page and setting the "Aggregation Bypass Cookie" should do this. I'll investigate this a little bit more and fix any issues I find. Created this issue: drupal.org/node/2422581 – mikeytown2 Feb 9 '15 at 6:41
  • 1
    @ben Committed a fix for that issue so there is a much higher probability of that file's change getting through even with the "Super cacher" in cpanel enabled. I don't have that so I can't test it. Download the latest advagg dev and set the bypass cookie or use ?advagg=0 to test. – mikeytown2 Feb 10 '15 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.