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!

4
  • 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. Commented Feb 9, 2015 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.
    – user16289
    Commented Feb 9, 2015 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. Commented Feb 9, 2015 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?
    – user16289
    Commented Feb 9, 2015 at 2:06

1 Answer 1

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.

3
  • 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.
    – user16289
    Commented Feb 9, 2015 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
    Commented Feb 9, 2015 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
    Commented Feb 10, 2015 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.