Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Smarter Styles plugin appears to be conflicting with the Advanced CSS/JS Aggregation (advagg) module. It looks to be a similar issue as with the LESS module: #1231462: Please make Hexagon/Canvas compatible with the LESS module.
I've tried to do a workaround similar to the one in #1231462, but with no luck yet. Any ideas?
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedThis is the file that is causing issues with AdvAgg
http://drupalcode.org/project/hexagon.git/blob/52a67271c650f40560baf8c88...
What you can do is load up a page that is having issues and place a
?advagg-debug=1
. This will output a large debug string to watchdog. Paste that below in a code block. From here I can guess at some solutions for this.Comment #2
dvessel CreditAttribution: dvessel commentedThanks for digging through this issue. I’m currently swamped with work so I can’t look at it until the weekend.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commented@dvessel
Long story short, AdvAgg has a bunch of hooks that do similar things that the smarter_styles_re_process_page() function does. Here are the list of hooks http://drupalcode.org/project/advagg.git/blob/refs/heads/6.x-1.x:/README...
Looking at the code seems like you would want to use these 2 hooks
- hook_advagg_css_pre_alter. Modify the raw $variables['css'] before it gets processed. Useful for file replacement.
- hook_advagg_css_extra_alter. Allows one to set the a prefix and suffix to be added into the HTML DOM. Useful for CSS conditionals.
Let me know if you need any changes to AdvAgg or if you need help implementing these hooks :)
Comment #4
rwohlebThe workaround hexagon plugin I started writing is already using the approach mikeytown2 mentions in #3, so it's good to know I'm on the right path. I just need to finish debugging it. I'll try and post the debug output requested in #1 as soon as I can.
Comment #5
dvessel CreditAttribution: dvessel commentedThe weekends over and this is still not resolved. Sorry folks, I’ll try to work on it tonight.
Comment #6
rwohlebStill no movement on this I guess. I'll try to swing around and poke at this issue again.