Inside fusion_core_preprocess_page() you check if preprocess_css is disabled. Wondering if you could also check if the AdvAgg module is enabled.

Comments

aquariumtap’s picture

Hi Mike. Do you mean something like this?

if (theme_get_setting('fix_css_limit') && !variable_get('preprocess_css', FALSE) && !module_exists('advagg')) {

Is the system variable 'preprocess_css' the performance setting for aggregating CSS? Does advagg need that set to TRUE?

aquariumtap’s picture

Mike, if it's about this issue: #1150150: AdvAgg - Fusion Core theme - Lost local.css?

It seems alexbk66 already disabled fix_css_limit ("Avoid IE stylesheet limit"), which would bypass that entire block of code, the same way !module_exists('advagg') would.

mikeytown2’s picture

Use variable_get('advagg_enabled', defined('ADVAGG_ENABLED')) instead of !module_exists('advagg'). It's part of that issue... skipping the "grouped import setting" would be a performance thing because it wouldn't build the CSS output twice. It's similar to #1142770: Seven Theme - Performance tweek & advagg fix.

BTW with advagg if you have the correct permissions you can do ?advagg=0 and it will turn off aggregation just for that page load; and it will only do the @import trick if it's IE. I find it very useful for debugging in a production environment.
The other thing that advagg has is the ability to set CSS prefixes/suffixes (think IE fixes), although you have to do that in hook_advagg_css_extra_alter.

In short I'm hunting around for feature requests for things that drupal_add_css/js should do. Another cool thing I did is you can use drupal_add_js to add a script to any part of the page; not just the header or the footer; no theme implementation required for it to work.

alexbk66-’s picture

Hi guys,

I asked the question on DC forum http://commons.acquia.com/discussion/advanced-cssjs-aggregation-and-dc

As there's no replies, I think I ask it here.

Is there any reason why the following css files are not inclused in advagg?

hobbyblob.com/profiles/drupal_commons/themes/acquia_commons/css/grid16-fluid.css
hobbyblob.com/profiles/drupal_commons/themes/acquia_commons/css/local.css
hobbyblob.com/profiles/drupal_commons/themes/fusion_core/css/grid16-fluid.css

I added the following code in my module, but it doesn't make any difference, not sure if it's the right way to do it anyway:


/**
 * Implements hook_init().
*/ 
function hobby_init() {
  $path = drupal_get_path('theme', 'acquia_commons');
  drupal_add_css($path . '/css/grid16-fluid.css');
  drupal_add_css($path . '/css/local.css');
  $path = drupal_get_path('theme', 'fusion_core');
  drupal_add_css($path . '/css/grid16-fluid.css');
}

osopolar’s picture

I understand that local.css is not aggregated and as long as you don't have a local.css there will be no problem. But why isn't the gridxxx.css inculded?

Poieo’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)