I'm having random issues when using admin_menu. I say "random" because some pages will load the menu fine, others won't. I can clear the cache on a page and the page that worked fine before, no longer works and a page that didn't work, now seems to be working. (might still be a browser cache issue... I cleared boost's cache, admin menu cache and advagg cache to no avail)

I've narrowed it down to the CSS files not being served from the right location. the /files directory is being inserted before the /sites, causing a rogue file... At first I thought it was CDN causing the issue, but after blacklisting */admin_menu/* and no longer having it try to serve the files from a CDN parallel subdomain, I began noticing advagg inserting the /files dir.

<link type="text/css" rel="stylesheet" media="all" href="/files/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css?I" />
<link type="text/css" rel="stylesheet" media="all" href="/files/sites/all/modules/admin_menu/admin_menu.css?I" />
<link type="text/css" rel="stylesheet" media="all" href="/files/sites/all/modules/admin_menu/admin_menu.uid1.css?I" />

It "might" also be how admin_menu inserts their files and something isn't right in the way they are doing it, but I wouldn't even know where to begin to find out...

D6 - 6.22
Advagg - 1.x-dev-[2012-01-10]
Boost - 1.x-dev-[2011-Dec-19]
Admin Menu - 3.x-dev-[2012-Jan-05]

I know this needs to be added to the feature request queue, but I want to say that it would be nice to have a blacklist function in the general settings to block stuff like this from being served from advagg if there is a known issue with a script or something. Similar to how CDN allows for a "file blacklist" and(or) a "path blacklist".

Comments

philsward’s picture

After looking into the issue a little further, I noticed that when doing a "?advagg-debug=1", all of the:

[css_before_conditional_styles] =>
    [css_merged] => Array

looked fine, where as

   [css_after] => <link type="text/css" rel="stylesheet" media="all" href="http://www.mysite.com/files/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css?v" />
<link type="text/css" rel="stylesheet" media="all" href="http://www.mysite.com/files/sites/all/modules/admin_menu/admin_menu.css?v" />
<link type="text/css" rel="stylesheet" media="all" href="http://www.mysite.com/files/sites/all/modules/admin_menu/admin_menu.uid1.css?v" />
<link type="text/css" rel="stylesheet" media="all" href="http://srv1.mysite.com/files/ctools/css/52d09b408ab64986ed8d3c671b00133f.css?v" />
<link type="text/css" rel="stylesheet" media="all" href="http://srv1.mysite.com/files/advagg_css/css_c80fcb87256fb461b3ee551f6de4e517_0.css" />
<link type="text/css" rel="stylesheet" media="all" href="http://srv1.mysite.com/files/advagg_css/css_40e9024dd2b6a7a128075bb06f2cb838_0.css" />
<link type="text/css" rel="stylesheet" media="all" href="http://srv1.mysite.com/files/advagg_css/css_47ddd3b8a2b43c0af2cea9fa253e65c4_0.css" />
<link type="text/css" rel="stylesheet" media="all" href="http://srv1.mysite.com/files/advagg_css/css_281a047ce155ead01dfe401e423b97b8_0.css" />

Digging into the recent log entries, I also noticed that it isn't specific to admin menu. There are other css files apparently doing the same thing. Specifically:
files/modules/dblog/dblog.css
files/misc/collapse.js
files/misc/textarea.js
files/misc/drupal.js
(and a few more...)

Next thing I noticed, the menu bar shows up when I go to: /admin/settings/advagg but just about anywhere else on the site, the /files is being inserted, rendering admin menu useless.

mikeytown2’s picture

advagg_build_uri() is the function that converts the file path to a URI. I do not have the issue your describing. I'm guessing something is up with some code of yours that uses hook_file_url_alter. The CDN module is one of the bits of code that uses this hook.

If I were you I would put some debug points in advagg_build_uri to help pinpoint what 3rd party code is returning stuff incorrectly.

philsward’s picture

"If I were you I would put some debug points in advagg_build_uri" You're talking to a complete programming idiot... Can you give me an idea of what you're talking about? I did some debug thing in the uri which I picked up from another issue post which gave me the output of what I posted in my previous post. This showed me that after advagg did it's thing, the /files directory was being inserted.

I can't remember if I mentioned that I blacklisted admin_menu from CDN but even then, admin_menu along with other uri's were having the /files directory inserted into the path.

doublejosh’s picture

I have this problem as well. But I think it's because I'm running CDN without the core patch yet (an older site).

The admin menu link get rewritten as:
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/files/sites/all/modules/admin_menu/admin_menu.css" />
So we're getting an extra /sites/all/files in the file path.

All stylesheet are NOT being effected by CDN with the addition of AdvAgg.
I've run all of these together successfully WITH the core patch via PressFlow.

mikeytown2’s picture

@doublejosh

if (variable_get(CDN_THEME_LAYER_FALLBACK_VARIABLE, FALSE)) {
  cdn_file_url_alter($path);
}

Try defining CDN_THEME_LAYER_FALLBACK_VARIABLE and setting that defined variable to be true. Should do the trick.

define('CDN_THEME_LAYER_FALLBACK_VARIABLE', 'cdn_theme_layer_fallback');
global $conf;
$conf['cdn_theme_layer_fallback'] = TRUE;
doublejosh’s picture

Tossed this in a misc site-wide tweaks module, didn't work. Then tried adding to the beginning of advagg.module in case of ordering, but no dice.
Page: that seems to fail.. /admin/settings

LeisureLarry’s picture

Subscribing

LeisureLarry’s picture

Issue summary: View changes

Removed information that was not caused by this module or issue.

mikeytown2’s picture

Status: Active » Closed (works as designed)

Closing out old issues.