I'm not sure if I've found a bug / incompatibility in advagg or if I need help with advagg configuration.

Advagg seems to work fine on the site in question, as always mikeytown2 has given us a great performance enhancement.
I was alerted to the possible problem when I tried to upload an image to the site using the IMCE image browser via FCKeditor / WYSIWYG. None of the styling appears and looking at the source none of the css or js files are being aggregated. This lead me to think that the problem might be with my configuration so I started looking further.

On looking further I was surprised to find that the same problem was apparent on the main "configuration" tab of the Advagg settings page (./admin/settings/advagg) BUT not on Advagg's other tabs, "information" etc.

No aggregation on "config", aggregation on "info" etc.
This seems to trigger IE's css limitation and thus this support request / bug report.

I'm also running CDN with the core patch applied and Boost.

./admin/reports/status reports that CDN, Advagg and Boost are installed and config'd correctly.

Anyone?

Comments

mikeytown2’s picture

No aggregation on "config" is by design; in case something bad happened and you need to get there. Can you look at the html source and count the number of CSS files; see if they use @import syntax if your in IE.

austintnacious’s picture

Total of 47 css files on the Advagg "config" tab, not using @import in IE9.

Total of 50 css files on IMCE file browser, no aggregation and no @import syntax.

Everywhere else seems to be behaving normally.

mikeytown2’s picture

in settings.php give this a try.

$conf['advagg_css_logged_in_ie_detect'] = FALSE;

Also can you tell me what this is when using IE9?

echo $_SERVER['HTTP_USER_AGENT'];

If your wondering, the code in question is in the advagg_unlimited_css_builder() function.

austintnacious’s picture

HTTP_USER_AGENT = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; WOW64; Trident/5.0).

I'm clueless about PHP but looking at the code you point to @ http://drupalcode.org/project/advagg.git/blob/047844dac4735757e2737ef59b...
and checking what stristr() does on php.net it seems like

line # 2004> "stristr($_SERVER['HTTP_USER_AGENT'], 'msie')"

should be catching it.

I tried changing "define('ADVAGG_CSS_LOGGED_IN_IE_DETECT', TRUE);" to "FALSE" in advagg.module rather than in settings.php assuming that would have the same result.

Even after flushing caches, still no @import syntax and no styling on IMCE browser pages.

mikeytown2’s picture

Title: Possible issue, definite support request with IE9 » AdvAgg/IMCE - Possible issue, definite support request with IE9. 31 CSS file limit.
Project: Advanced CSS/JS Aggregation » IMCE
Version: 6.x-1.5 » 6.x-2.x-dev
Component: Miscellaneous » Code

Looking at the imce_page() function and advagg's page hooks will not run in this case. Moving to that issue queue as I can't do anything from my side.

ufku’s picture

One may manually call advagg_processor() in imce/tpl/imce-page.tpl.php. There is already a similar code for jquery preprocessor in the file.

austintnacious’s picture

OK, so that seems to have worked a treat!

Thanks a bunch!

Again, I am clueless about PHP so I'm not sure if I've done it the right way but here's how it looks

I removed

  <?php print drupal_get_css(); ?>

and added

  <?php $vars['styles'] = drupal_get_css('header'); ?>
  <?php function_exists('advagg_processor') && advagg_processor($vars); ?>
  <?php print $vars['styles']; ?>

Is there any way / chance that future releases of IMCE will be able to "know about" Advagg and / or other modules that might break the IMCE file browser layout?

Again thanks to both of you!

ufku’s picture

Status: Active » Fixed

@austintnacious, it's a template file, you can put the altered one into your theme's folder so that it won't get overwritten during updates.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.