Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Source Link
nikan
  • 259
  • 1
  • 4
  • 13

drupal_add_css does now work when in cache mode

I am trying to add a jquery plugin to a page through drupal_add_css and drupal_add_js as follows:

drupal_add_css($path = 'sites/all/libraries/gips/css/gips.css', $type = 'file', $media = 'all', $preprocess = true);
drupal_add_js('sites/all/libraries/gips/js/gips.js', array('type' => 'file', 'scope' => 'header', 'weight' => 3));
drupal_add_js("jQuery(document).ready(function(){...dosomething...});"), array('type' => 'inline', 'scope' => 'footer', 'weight' => 5));

When I'm not aggregating/caching the CSS files, it works fine. When I try to aggregate the CSS files, it doesn't. The behavior is as if some css rules get lost in the process. The same happens even if I change the $preprocess to false.

From Chrome's code inspector, I cannot see any overriding rules getting in the way either.

I am at a loss on how to debug this. Any suggestions?