I've successfully gotten AdvAgg working on 3 Drupal 6.22 sites, but, keep getting 'Adv CSS/JS Agg - Asynchronous Mode Set to FALSE' on one site.

I've tried the suggested fixes for Fast 404, Cache clear, IP Address to send all asynchronous requests to: -1, Maintenance mode off, etc. No cigar.

Here's the Asynchronous debug info:

stdClass Object (
    [request] => GET /files/advagg_css/css_missing14510339121306523897_0.css HTTP/1.0
Host: example.com
User-Agent: Drupal (+http://drupal.org/)

    [data] => 239d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
  <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Page not found - 404</title>
    <link type="text/css" rel="stylesheet" media="all" href="/modules/node/node.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/defaults.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system-menus.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/user/user.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/cck/theme/content-module.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/ctools/css/ctools.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/date/date.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/dhtml_menu/dhtml_menu.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/filefield/filefield.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/jquerymenu/jquerymenu.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/logintoboggan/logintoboggan.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/cck/modules/fieldgroup/fieldgroup.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/views/css/views.css?k" />
<link type="text/css" rel="stylesheet" media="all" href="/files/color/garland-c634f946/style.css?k" />
<link type="text/css" rel="stylesheet" media="print" href="/themes/garland/print.css?k" />
    <script type="text/javascript" src="/sites/all/modules/jquery_update/replace/jquery.js?k"></script>
<script type="text/javascript" src="/misc/drupal.js?k"></script>
<script type="text/javascript" src="/sites/all/modules/adsense/contrib/adsense_click/adsense_click.js?k"></script>
<script type="text/javascript" src="/sites/all/modules/dhtml_menu/dhtml_menu.js?k"></script>
<script type="text/javascript" src="/sites/all/modules/google_analytics/googleanalytics.js?k"></script>
<script type="text/javascript" src="/sites/all/modules/jquerymenu/jquerymenu.js?k"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/", "dhtmlMenu": [ "doubleclick", "clone" ], "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip" } });
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
window.google_analytics_uacct = "UA-409846-31";
//--><!]]>
</script>
    <!--[if lt IE 7]>
      <link type="text/css" rel="stylesheet" media="all" href="/themes/garland/fix-ie.css" />    <![endif]-->
  </head>
  <body>
<!-- Layout -->
  <div id="header-region" class="clear-block"></div>
    <div id="wrapper">
    <div id="container" class="clear-block">
      <div id="header">
        <div id="logo-floater">
        <h1><a href="/" title=".::."><img src="/images/logo.png" alt=".::." id="logo" /><span>xxx</span>  .::.  </a></h1>        </div>
                  <ul class="links primary-links"><li class="menu-136 first"><a href="/about.html">About</a></li>
<li class="menu-135 last"><a href="/services.html">Services</a></li>
</ul>                                  
      </div> <!-- /header -->
      
      <div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner">
          <div class="breadcrumb"><a href="/">Home</a></div>                              <h2>Page not found - 404</h2>                                                  <div class="clear-block">
            <div id="node-8" class="node">
  
  <div class="content clear-block">
    <!-- google_ad_section_start --><h2 id="pageName">Oops, we couldn't find that page...</h2>
<div class="feature">
    <p>... it may have moved, or may be listed under a new name or if you typed in the name, perhaps there  was a typo.<br />
<br />
  Please try searching for the page using the Google search form at the bottom of the page. If you still can't find what you are looking for, send an email to the webmaster. Let us know and we'll work hard to get you the information you want!</p>
</div>	 
<br />
<!-- input type modified from "q" to "as_q" as per article at: http://www.techmag.biz/google_onsite_search_on_drupal  -->
<!-- SiteSearch Google -->
<form method="get" action="http://texas-video.com/sitesearchresults.html" target="_top">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>
</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="example.com"></input>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="as_q" size="60" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Search" id="sbb"></input>
</td></tr>
<tr>
<td>&nbsp;</td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" id="ss0"></input>
<label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="texas-video.com" checked id="ss1"></input>
<label for="ss1" title="Search the example website"><font size="+1" color="#000000">example.com</font></label></td>
</tr>
</table>
<input type="hidden" name="client" value="pub-6051175549824070"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="safe" value="active"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:11"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->
<!-- break -->
<!-- google_ad_section_end -->  </div>
  <div class="clear-block">
    <div class="meta">
        </div>
      </div>
</div>
          </div>
                    <div id="footer">example</div>
      </div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->
      
    </div> <!-- /container -->
  </div>
<!-- /layout -->
  <div style="height: 0px; width: 0px;"><a href="http://www.lisapace.com/backstage.php?m=70">telesync</a></div>
    <!--[if IE 6]>
      <script type="text/javascript">
        var IE6UPDATE_OPTIONS = {
          icons_path: "http://example.com/sites/all/modules/ie6update/images/",
          message: "Internet Explorer is missing updates required to view this site. Click here to update... ",
          url: "http://www.microsoft.com/windows/internet-explorer/default.aspx"
        }
      </script>
      <script type="text/javascript" src="http://example.com/sites/all/modules/ie6update/ie6update.js"></script>
    <![endif]-->
  <script type="text/javascript">
<!--//--><![CDATA[//><!--
var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-409846-31"]);_gaq.push(["_trackPageview", "/404.html?page=" + document.location.pathname + document.location.search + "&from=" + document.referrer]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = "/files/googleanalytics/ga.js?k";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
//--><!]]>
</script>
  </body>
</html>

0

    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array (
            [Date] => Fri, 27 May 2011 19:18:17 GMT
            [Server] => Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.13
            [X-Powered-By] => PHP/5.2.13
            [Set-Cookie] => SESS01dcf23648a9c4e7f4b38aa0a1b143f5=388ef0089313098c0a426500bd5a8a2a; expires=Sun, 19-Jun-2011 22:51:37 GMT; path=/; domain=.videotexan.com
            [Expires] => Sun, 19 Nov 1978 05:00:00 GMT
            [Last-Modified] => Fri, 27 May 2011 19:18:17 GMT
            [Cache-Control] => post-check=0, pre-check=0
            [Vary] => Accept-Encoding,User-Agent
            [Transfer-Encoding] => chunked
            [Content-Type] => text/html; charset=utf-8
        )
    [error] => Not Found
    [code] => 404
    [timer] => Array (
            [count] => 1
            [time] => 2554.49
        )
)

Next step?

Note to self: vt.c

Comments

mikeytown2’s picture

hmmm; this looks like a menu issue. Can you try clearing the menu cache one more time?

If still no go, you will have to hack core and add this to includes/common.inc at the top of the drupal_not_found() function. OR in your case, you can change node/8 (your 404 page) to have the PHP input filter and add this code to the top of it. The debug_backtrace() function will let us know who called drupal_not_found().

  $bt = debug_backtrace();
  foreach ($bt as $key => $value) {
    if ($key == 0) {
      continue;
    }
    unset($bt[$key]['args']);
    unset($bt[$key]['object']);
  }
  watchdog('advagg-404', str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($bt, TRUE)))));

Then go to admin/settings/advagg/info, then go to watchdog, get the "advagg-404" entry for /files/advagg_css/css_missing... and paste it here.

TallDavid’s picture

Here it is! ---->

Array
(
    [0] => Array
        (
            [file] => /home/talldave/public_html/example.com/includes/common.inc
            [line] => 1696
            [function] => eval
        )

    [1] => Array
        (
            [file] => /home/talldave/public_html/example.com/modules/php/php.module
            [line] => 81
            [function] => drupal_eval
        )

    [2] => Array
        (
            [function] => php_filter
        )

    [3] => Array
        (
            [file] => /home/talldave/public_html/example.com/includes/module.inc
            [line] => 461
            [function] => call_user_func_array
        )

    [4] => Array
        (
            [file] => /home/talldave/public_html/example.com/modules/filter/filter.module
            [line] => 455
            [function] => module_invoke
        )

    [5] => Array
        (
            [file] => /home/talldave/public_html/example.com/modules/node/node.module
            [line] => 1047
            [function] => check_markup
        )

    [6] => Array
        (
            [file] => /home/talldave/public_html/example.com/modules/node/node.module
            [line] => 1091
            [function] => node_prepare
        )

    [7] => Array
        (
            [file] => /home/talldave/public_html/example.com/modules/node/node.module
            [line] => 1012
            [function] => node_build_content
        )

    [8] => Array
        (
            [file] => /home/talldave/public_html/example.com/modules/node/node.module
            [line] => 1107
            [function] => node_view
        )

    [9] => Array
        (
            [file] => /home/talldave/public_html/example.com/modules/node/node.module
            [line] => 1803
            [function] => node_show
        )

    [10] => Array
        (
            [function] => node_page_view
        )

    [11] => Array
        (
            [file] => /home/talldave/public_html/example.com/includes/menu.inc
            [line] => 349
            [function] => call_user_func_array
        )

    [12] => Array
        (
            [file] => /home/talldave/public_html/example.com/includes/common.inc
            [line] => 381
            [function] => menu_execute_active_handler
        )

    [13] => Array
        (
            [file] => /home/talldave/public_html/example.com/index.php
            [line] => 23
            [function] => drupal_not_found
        )

)
mikeytown2’s picture

Top of the stack is [file] => index.php; means menu_execute_active_handler() was ran. Means your menu cache doesn't have advagg in it yet.

With phpmyadmin what does this give you?

SELECT *
FROM menu_router
WHERE file LIKE '%advagg.missing.inc'

If nothing does this give you anything?

SELECT *
FROM menu_router
WHERE file LIKE '%advagg%'

In either case try running this function if your standard drupal cache clear is not working (admin/settings/performance at the bottom press the "Clear cached data" button )

menu_rebuild();

Long story short this appears to be a menu issue.

TallDavid’s picture

StatusFileSize
new81.93 KB
new25.99 KB
SELECT *
FROM menu_router
WHERE file LIKE '%advagg.missing.inc'

gives the results in the attached file: 5-27-2011 11-58-00 PM.png

SELECT *
FROM menu_router
WHERE file LIKE '%advagg%'

gives the results in the attached file: 5-28-2011 12-06-20 AM.png

Clearing the cache via the

<?php
menu_rebuild();
?>

function doesn't seem to make any difference.

mikeytown2’s picture

Sorry but I don't know what to tell you. The correct entry is in the menu_router table. path matches the test url.
files/advagg_css/%
files/advagg_css/css_missing14510339121306523897_0.css

My last recommendation, which is a bad idea to do on a live site is to disable all caching
http://www.garfieldtech.com/blog/drupal-cache-disable
Place this in your settings.php file at the bottom and hit the status page.

$conf['cache_inc'] = 'includes/cache-install.inc';

This should let me know to a fairly high level of confidence that the cache is not the issue. includes/cache-install.inc for the curious.

TallDavid’s picture

This is a head-scratcher. Disabling of all caching (as per garfieldtech.com) makes no difference.

I also tried uninstalling/re-installing AdvAgg as well as updating to this morning's 6.x-1.x-dev code, trying a new theme and a few other things. Nothing makes a difference.

Peter Bowey’s picture

refer #8

Are you using Pressflow?

If so, see http://drupal.org/node/1172012 and http://drupal.org/node/1169702 for how I dealt with the problem...

The 'clue' is if you see the following in the async advagg debug status

stdClass Object (
    [error] => missing schema
    [code] => -1002
    [timer] => Array (
            [count] => 1
            [time] => 0.04
        )
)
TallDavid’s picture

Peter, thanks for the suggestion. No, I am not using Pressflow. So far, 3 Drupal 6.22 sites work fine with AdvAgg and on 2 I can't get past the 'Asynchronous Mode Set to FALSE' problem.

Peter Bowey’s picture

Refer #8
'Tall David', I cannot see all of your advagg's debug info (above)!
Note: It has 2 parts...

Mine looks like this (in 2 parts):

Part1:

http://www.peterbowey.com.au/sites/peterbowey.com.au/files/advagg_css/css_missing16439535171306645578_0.css: 

stdClass Object (
    [request] => GET /sites/peterbowey.com.au/files/advagg_css/css_missing16439535171306645578_0.css HTTP/1.0
Host: www.peterbowey.com.au
User-Agent: Drupal (+http://drupal.org/)

    [data] => <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p><a href="/">Home</a></p><!-- advagg_missing_fast404 --></body></html>
    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array (
            [Server] => nginx
            [Date] => Sun, 29 May 2011 05:06:17 GMT
            [Content-Type] => text/html; charset=utf-8
            [Connection] => close
            [X-Accel-Expires] => 0
            [X-Drupal-Cache] => MISS
            [Last-Modified] => Sun, 29 May 2011 05:06:18 +0000
            [ETag] => "1306645578"
            [X-AdvAgg] => Failed Validation. Wrong Pattern.
            [Expires] => Sun, 19 Nov 1978 05:00:00 GMT
            [Cache-Control] => must-revalidate
            [Content-Length] => 307
        )
    [error] => Not Found
    [code] => 404
    [timer] => Array (
            [count] => 1
            [time] => 62.39
        )
)

Part 2: (CDN Debug typically)

http://small.gdlcdn.com/802C5F/cdn1/sites/peterbowey.com.au/files/advagg_css/css_missing16439535171306645578_0.css: 

stdClass Object (
    [request] => GET /index.php?q=sites/peterbowey.com.au/files/advagg_css/css_missing16439535171306645578_0.css HTTP/1.0
Host: www.peterbowey.com.au
User-Agent: Drupal (+http://drupal.org/)

    [data] => <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p><a href="/">Home</a></p><!-- advagg_missing_fast404 --></body></html>
    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array (
            [Server] => nginx
            [Date] => Sun, 29 May 2011 05:06:17 GMT
            [Content-Type] => text/html; charset=utf-8
            [Connection] => close
            [X-Accel-Expires] => 0
            [X-Drupal-Cache] => MISS
            [Last-Modified] => Sun, 29 May 2011 05:06:18 +0000
            [ETag] => "1306645578"
            [X-AdvAgg] => Failed Validation. Wrong Pattern.
            [Expires] => Sun, 19 Nov 1978 05:00:00 GMT
            [Cache-Control] => must-revalidate
            [Content-Length] => 307
        )
    [error] => Not Found
    [code] => 302
    [redirect_code] => 404
    [redirect_url] => http://www.peterbowey.com.au/index.php?q=sites/peterbowey.com.au/files/advagg_css/css_missing16439535171306645578_0.css
    [timer] => Array (
            [count] => 1
            [time] => 318.06
        )
)

Hope I am not confusing you.

The 'critical' part is (advagg) seeing both: [1]<!-- advagg_missing_fast404 --> and [2][X-AdvAgg] => Failed Validation. Wrong Pattern

However, at least you have 'template' for how advagg info 'should' look with a valid async.

I note that your (above) 404 response looks 'strange', as though something else is handling 404's.

Peter Bowey’s picture

'TallDavid', have you compared the advagg debug info data between the working and non-working sites (systems)?

I am sure there is good 'clue' in doing that comparison.

TallDavid’s picture

Peter, the AdvAgg debug info only has 1 part on my site and that is what was provided in the initial writeup above. I'm not running a CDN, could this be the reason that I'm not seeing a Part 2 like the one you presented? If I misunderstood your suggestion, please let me know. I'm inexperienced in the CSS/JS Aggregation area, but I learn fast.

I attempted to take your suggestion and to compare the AdvAgg async debug info between one of the working and a non-working site, but, the 'Asynchronous debug info' does not exist on the working site (there's nothing to debug since it's working ;-).

I've now encountered a total of 3 sites that work and 3 sites that have the same 'Adv CSS/JS Agg - Asynchronous Mode Set to FALSE' issue. (All on the same server.)

mikeytown2’s picture

In regards to the idea in #1. You checked the location of the watchdog report to make sure it came from the advagg path, correct? If not run #1 again, but with this code; it will only output to watchdog if /advagg_ is in the path.

  if (!strpos($_SERVER['QUERY_STRING'], '/advagg_')) {
    return;
  }
  $bt = debug_backtrace();
  foreach ($bt as $key => $value) {
    if ($key == 0) {
      continue;
    }
    unset($bt[$key]['args']);
    unset($bt[$key]['object']);
  }
  watchdog('advagg-404', str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($bt, TRUE)))));

I do plan on using menu_get_item() to help on the status page; will let me know if a menu cache flush is needed; but I haven't written that patch yet.

TallDavid’s picture

MickeyTown2, thanks for your persistence in troubleshooting this issue.

Yes, when I originally performed the steps in #1, there was an "advagg-404" entry in the watchdog from which I cut-n-pasted. (The entry is still there... this is a very low volume site).

After placing the revised code from #12 in my 404 page (node 8), visiting admin/settings/advagg/info and then going to watchdog, there is no new "advagg-404" entry. There is, however, this entry:

Type	page not found
Date	Sunday, May 29, 2011 - 16:12
User	Anonymous
Location http://example.com/files/advagg_css/css_missing18319248281306703533_0.css

What's next?

[FYI, I've updated a few more sites to Drupal 6.22 and installed AdvAgg after the upgrade. Currently 6 sites are working fine and 3 have problems with 'Adv CSS/JS Agg - Asynchronous Mode Set to FALSE'.]

Peter Bowey’s picture

Refer #11

TallDavid, the latest advagg *.dev version now has a async. info/debug status window built in. It will always show 'results'. The sample 'result' I sent you is of a correctly working advagg. This may help you!

Looking at #1 state, I see 'possible' issues with 404 handling. Your 404 is 'bypassing' from being processed thru advagg. So no async. check pass - what Mike refers to as the advagg 'menu callback' that should result. Hence Mike's suggestion to 'clear the menu cache'...

It also looks to me as though you have a type of 'search404' process added to your 404 chain?
eg: http://drupal.org/project/search404
and I see this "<!-- SiteSearch Google -->"
I would use the KISS concept to debug :)

mikeytown2’s picture

your not using the CDN module so I doubt my latest fixes for this issue will do anything... but it's worth trying.
#1172012: cdn_file_url_alter's path blacklist by default has admin*. AdvAgg CDN tests on status page not working as a result.

For the sites that do work in comparison to the sites that don't, could you list out what modules are different or if any code is different?

mikeytown2’s picture

StatusFileSize
new2.82 KB

@TallDavid
This patch below has been committed; let me know if you get the 'Flush your caches' warning on the status page.

TallDavid’s picture

Final count on 15 sites updated to Dupal 6.22: 12 sites have no problems with AdvAgg. But, I haven't been able to resolve the 'Adv CSS/JS Agg - Asynchronous Mode Set to FALSE' issue on the remaining 3 sites. I've downloaded the latest dev version, but, it's way too late to do any testing tonight. I'll follow-up on the 'morrow.

TallDavid’s picture

@mikeytown2, I've updated the site to the May 31, 2011 version of AdvAgg 6.x-1.x-dev. I'm still getting 'Adv CSS/JS Agg - Asynchronous Mode Set to FALSE' and do not see a 'Flush your caches' warning on the status page.

The 'Asynchronous debug info' now shows:

stdClass Object (
    [request] => GET /files/advagg_css/css_missing18897477371306969400_0.css HTTP/1.0
Host: problemsite1.com
User-Agent: Drupal (+http://drupal.org/)

    [data] => <html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p></body></html>
    [protocol] => HTTP/1.0
    [status_message] => Not Found
    [headers] => Array (
            [Date] => Wed, 01 Jun 2011 23:03:21 GMT
            [Server] => Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.13
            [X-Powered-By] => PHP/5.2.13
            [Vary] => Accept-Encoding,User-Agent
            [Content-Length] => 139
            [Connection] => close
            [Content-Type] => text/html
        )
    [error] => Not Found
    [code] => 404
    [timer] => Array (
            [count] => 1
            [time] => 169.12
        )
)
mikeytown2’s picture

Do you mind searching your code base for "The requested URL was not found on this server." That looks like a fast404.

TallDavid’s picture

The string "The requested URL was not found on this server." is found on this site in the advagg.module and settings.php files.

Peter Bowey’s picture

To #20 (via settings.php grep); that's a fast404

See http://2bits.com/drupal-planet/reducing-server-resource-utilization-busy...

TallDavid’s picture

Peter, yes, I am aware of this. I've followed the documentation and modified the Fast 404 to accommodate AdvAgg and still get 'Adv CSS/JS Agg - Asynchronous Mode Set to FALSE'. I've completely removed the Fast 404 code from my settings.php and still get 'Adv CSS/JS Agg - Asynchronous Mode Set to FALSE'. I've disabled modules and still get 'Adv CSS/JS Agg - Asynchronous Mode Set to FALSE'. None of the changes that I have tried get past that one issue. I think we may be chasing the wrong rabbit.

mikeytown2’s picture

Remove the fast404 code from settings.php and hit the info & status pages again. We keep digging till we find it; right now fast404 appears to be the issue, but with that gone we'll hopefully find the next roadblock fairly easily.

TallDavid’s picture

Done. The 'Asynchronous debug info' now shows:

stdClass Object (
    [request] => GET /files/advagg_css/css_missing20640451651306982010_0.css HTTP/1.0
Host: problemsite1.com
User-Agent: Drupal (+http://drupal.org/)

    [data] => <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
  <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="alternate" type="application/rss+xml" title="problemsite1 RSS" href="http://problemsite1.com/node/feed" />
    <title>problemsite1 |  .::.  </title>
    <link type="text/css" rel="stylesheet" media="all" href="/files/advagg_css/css_e0164243cc8232637d345c54c6075f04_4.css" />
<link type="text/css" rel="stylesheet" media="print" href="/files/advagg_css/css_281646241c4f472b8a5f94fbf04f44ec_4.css" />
    <script type="text/javascript" src="/files/advagg_js/js_9de4bf4356cfc61eec5eba97ed1d0875_3.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/","dhtmlMenu":["doubleclick","clone"],"googleanalytics":{"trackOutgoing":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip"}});
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
window.google_analytics_uacct = "UA-555555-55";
//--><!]]>
</script>
    <!--[if lt IE 7]>
      <link type="text/css" rel="stylesheet" media="all" href="/themes/garland/fix-ie.css" />    <![endif]-->
  </head>
  <body class="sidebar-left">
<!-- Layout -->
  <div id="header-region" class="clear-block"></div>
    <div id="wrapper">
    <div id="container" class="clear-block">
      <div id="header">
        <div id="logo-floater">
        <h1><a href="/" title="problemsite1  .::.  problemsite1"><img src="/images/texas-video-logo.png" alt="problemsite1  .::.  problemsite1" id="logo" /><span>problemsite1</span>  .::.  problemsite1</a></h1>        </div>
                  <ul class="links primary-links"><li class="menu-136 first"><a href="/about.html">About</a></li>
<li class="menu-135 last"><a href="/services.html">Services</a></li>
</ul>                                  
      </div> <!-- /header -->
              <div id="sidebar-left" class="sidebar">
                    <div id="block-user-0" class="clear-block block block-user">
  <h2>User login</h2>
  <div class="content"><form action="/node?destination=node"  accept-charset="UTF-8" method="post" id="user-login-form">
<div><div class="form-item" id="edit-name-wrapper">
 <label for="edit-name">Username: <span class="form-required" title="This field is required.">*</span></label>
 <input type="text" maxlength="60" name="name" id="edit-name" size="15" value="" class="form-text required" />
</div>
<div class="form-item" id="edit-pass-wrapper">
 <label for="edit-pass">Password: <span class="form-required" title="This field is required.">*</span></label>
 <input type="password" name="pass" id="edit-pass"  maxlength="60"  size="15"  class="form-text required" />
</div>
<input type="submit" name="op" id="edit-submit" value="Log in"  class="form-submit" />
<div class="item-list"><ul><li class="first last"><a href="/user/password" title="Request new password via e-mail.">Request new password</a></li>
</ul></div><input type="hidden" name="form_build_id" id="form-61581fb14176dea10952519b0ed08438" value="form-61581fb14176dea10952519b0ed08438"  />
<input type="hidden" name="form_id" id="edit-user-login-block" value="user_login_block"  />
</div></form>
</div>
</div>
<div id="block-user-3" class="clear-block block block-user">
  <h2>Who's online</h2>
  <div class="content">There are currently <em>1 user</em> and <em>0 guests</em> online.<div class="item-list"><h3>Online users</h3><ul><li class="first last">talldave</li>
</ul></div></div>
</div>
        </div>
      
      <div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner">
                                                                                          <div class="clear-block">
            <div id="node-1" class="node">
  <h2><a href="/about.html" title="About Us">About Us</a></h2>
  
  <div class="content clear-block">
    <!-- google_ad_section_start --><p><strong>NOTE:</strong>  problemsite1</p><p><strong>problemsite1</strong> problemsite1 </p>
<p>problemsite1</p>

<!-- google_ad_section_end -->  </div>
  <div class="clear-block">
    <div class="meta">
        </div>
          <div class="links"><ul class="links inline"><li class="node_read_more first last"><a href="/about.html" title="Read the rest of About Us.">Read more</a></li>
</ul></div>
      </div>
</div>
          </div>
          <a href="http://problemsite1.com/node/feed" class="feed-icon"><img src="/misc/feed.png" alt="Syndicate content" title="problemsite1 RSS" width="16" height="16" /></a>          <div id="footer">problemsite1</div>
      </div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->
      
    </div> <!-- /container -->
  </div>
<!-- /layout -->
    <!--[if IE 6]>
      <script type="text/javascript">
        var IE6UPDATE_OPTIONS = {
          icons_path: "http://problemsite1.com/sites/all/modules/ie6update/images/",
          message: "Internet Explorer is missing updates required to view this site. Click here to update... ",
          url: "http://www.microsoft.com/windows/internet-explorer/default.aspx"
        }
      </script>
      <script type="text/javascript" src="http://problemsite1.com/sites/all/modules/ie6update/ie6update.js"></script>
    <![endif]-->
  <script type="text/javascript">
<!--//--><![CDATA[//><!--
var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-409846-31"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = "/files/googleanalytics/ga.js?B";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
//--><!]]>
</script>
  </body>
</html>
    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array (
            [Date] => Thu, 02 Jun 2011 02:33:30 GMT
            [Server] => Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.13
            [X-Powered-By] => PHP/5.2.13
            [Set-Cookie] => SESS01dcf23648a9c4e7f4b38aa0a1b143f5=0a5a306245b62d5948d5c09da70f63a8; expires=Sat, 25-Jun-2011 06:06:50 GMT; path=/; domain=.problemsite1.com
            [Expires] => Sun, 19 Nov 1978 05:00:00 GMT
            [Last-Modified] => Thu, 02 Jun 2011 02:33:30 GMT
            [Cache-Control] => post-check=0, pre-check=0
            [Vary] => Accept-Encoding,User-Agent
            [Content-Length] => 7757
            [Connection] => close
            [Content-Type] => text/html; charset=utf-8
        )
    [error] => Not Found
    [code] => 404
    [timer] => Array (
            [count] => 1
            [time] => 461.29
        )
)
mikeytown2’s picture

hmmm I'm running out of ideas for solving this issue. Can you compare what modules are installed on a site that works VS one of your problem sites? Run this code on each of the sites, it will output a sorted module list; from there get the differences and we'll go through the list.

$data = module_list();
asort($data);
echo str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($data, TRUE))));
Peter Bowey’s picture

Refer #24

@TallDavid clearly you have a 'third-party' direct interception for 404's - or an issue with Apache! As it is appears that you are using Apache, this problem could [also] happen in the .htaccess handling - or in several Drupal Modules.

Notes: advagg will normally handle the missing (js|css) asset if Drupal is handed the 404 directly and correctly. If Apache is diverting the 404 to it's own process - then advagg will not pass the async. verification - (though it will still perform it's work OK).

Judging by the 'large length / size' of your problem sites 404's (above samples), I am reasonably confident that you have a custom 404 process in place!

If you suspect that this 'could' be a PHP code problem, then I suggest that you enable PHP 5.x E Notices! I have discovered many problems this way (often 'sloppy PHP code practices' - Drupal and other).

Notes: Standard Drupal disables PHP E' Notices, Pressflow does not (a great debug tool - I think)!

TallDavid’s picture

Version: 6.x-1.x-dev » 6.x-1.0-rc6

@mikeytown2, below is a table with the differences in modules between two sites that exhibit the problem (first 2 columns) and one site that does not exhibit the problem (last column).

There are several modules that are on both problem sites, but, not on the 'good' site (date_api, date_timezone, jquery_ui, logintoboggan). These seemed to be good candidates for further testing. On each of the two problem sites, I disabled these modules, cleared the cache and ran a site status to see if the problem was resolved. The problem persists on these sites.

@peter, these sites all run on the same server, so I'm assuming that Apache is not the problem. Please let me know if this is not a good assumption.

I've compared the /.htaccess file on the problem sites to a 'good' site and found no problems. I've removed custom 404 pages from the problem site. I'm not familiar with 'PHP 5.x E Notices', I'll do some research.

Module differences between two problem sites and 1 good site:



Problem site 1 Problem site 2 OK site 1
    [adsense_click] => adsense_click
    [adsense_cse] => adsense_cse
    [adsense_managed] => adsense_managed
    [advagg_bundler] => advagg_bundler
    [advagg_css_compress] => advagg_css_compress
    [advagg_js_cdn] => advagg_js_cdn
    [advagg_js_compress] => advagg_js_compress
    [amplify] => amplify
    [autotagging] => autotagging
    [autotagging_calais] => autotagging_calais
    [autotagging_yahoo_terms] => autotagging_yahoo_terms
    [calais] => calais     [calais] => calais
    [calais_api] => calais_api     [calais_api] => calais_api
    [calais_geo] => calais_geo
    [calais_marmoset] => calais_marmoset
    [calais_tagmods] => calais_tagmods     [calais_tagmods] => calais_tagmods
    [calendar] => calendar
    [captcha] => captcha     [captcha] => captcha
    [comment] => comment
    [clone] => clone     [clone] => clone
    [color] => color     [color] => color
    [comment] => comment     [comment] => comment
    [contact] => contact
    [countdown] => countdown
    [date] => date
    [date_api] => date_api     [date_api] => date_api
    [date_timezone] => date_timezone     [date_timezone] => date_timezone
    [date_tools] => date_tools
    [db_maintenance] => db_maintenance
    [dbtuner] => dbtuner
    [elements] => elements     [elements] => elements     [elements] => elements
    [email] => email
    [extlink] => extlink
    [fasttoggle] => fasttoggle
    [feeds] => feeds
    [feeds_import] => feeds_import
    [feeds_news] => feeds_news
    [feeds_ui] => feeds_ui
    [gmap] => gmap
    [gmap_location] => gmap_location
    [gmap_macro_builder] => gmap_macro_builder
    [gmap_taxonomy] => gmap_taxonomy
    [headjs] => headjs
    [help] => help     [help] => help
    [image_resize_filter] => image_resize_filter     [image_resize_filter] => image_resize_filter
    [imageapi_gd] => imageapi_gd
    [imageapi_imagemagick] => imageapi_imagemagick     [imageapi_imagemagick] => imageapi_imagemagick
    [insert] => insert
    [job_scheduler] => job_scheduler     [job_scheduler] => job_scheduler
    [jquery_ui] => jquery_ui     [jquery_ui] => jquery_ui
    [jstools] => jstools
    [location] => location
    [logintoboggan] => logintoboggan     [logintoboggan] => logintoboggan
    [moduleinfo] => moduleinfo
    [mollom] => mollom     [mollom] => mollom
    [network_manager] => network_manager     [network_manager] => network_manager
    [nodereference] => nodereference     [nodereference] => nodereference
    [nodewords_admin] => nodewords_admin     [nodewords_admin] => nodewords_admin
    [nodewords_basic] => nodewords_basic     [nodewords_basic] => nodewords_basic
    [nodewords_custom_pages] => nodewords_custom_pages
    [nodewords_tokens] => nodewords_tokens
    [number] => number     [number] => number
    [openid] => openid
    [page_manager] => page_manager
    [prod_check] => prod_check
    [qpcache] => qpcache
    [qpservices] => qpservices
    [querypath] => querypath
    [querypath_examples] => querypath_examples
    [rdf] => rdf     [rdf] => rdf
    [recaptcha] => recaptcha
    [recaptcha_mailhide] => recaptcha_mailhide
    [search] => search
    [site_verify] => site_verify     [site_verify] => site_verify
    [sitedoc] => sitedoc
    [sitenotes] => sitenotes
    [stylizer] => stylizer
    [token_actions] => token_actions
    [typogrify] => typogrify     [typogrify] => typogrify
    [upgrade_status] => upgrade_status
    [user_register_notify] => user_register_notify
    [userreference] => userreference
    [views_bonus_export] => views_bonus_export
    [views_ui] => views_ui     [views_ui] => views_ui
    [views_bulk_operations] => views_bulk_operations
    [views_ui] => views_ui
    [xmlsitemap] => xmlsitemap     [xmlsitemap] => xmlsitemap
    [xmlsitemap_engines] => xmlsitemap_engines     [xmlsitemap_engines] => xmlsitemap_engines
    [xmlsitemap_node] => xmlsitemap_node     [xmlsitemap_node] => xmlsitemap_node
Peter Bowey’s picture

Refer #27

@TallDavid
Perhaps you could use Firefox with the "Live HTTP headers extension" to check the HTTP Header 404 states (live capture).

https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/

After you have installed that extension and restarted Firefox, go to Tools —> Live HTTP headers. That will open up the Live header-viewer window.

In my own 'basic debugging' with advagg 'missing-404' HTTP header responses - you do get an idea what is actually occurring.

mikeytown2’s picture

Going back to #12, if you do not have fast 404's running can you run this code at the bottom of your 404 node page.

  $bt = debug_backtrace();
  foreach ($bt as $key => $value) {
    if ($key == 0) {
      continue;
    }
    unset($bt[$key]['args']);
    unset($bt[$key]['object']);
  }
  watchdog('advagg-404', str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($bt, TRUE)))));

If the end of the trace looks just like

[file] => index.php
[line] => 23
[function] => drupal_not_found

and the status report for advagg doesn't throw a Flush your caches warning then I'm out of ideas; if you don't get a advagg-404 entry in watchdog than something is intercepting the request. When checking the advagg-404 entries make sure the location is set to something like files/advagg_css/css_missing14510339121306523897_0.css. The last option would be to setup xdebug and get a full stack trace to try and figure out what function is calling drupal_not_found.

TallDavid’s picture

Version: 6.x-1.0-rc6 » 6.x-1.x-dev

Note: I've updated to the latest AdvAgg 6.x-1.x-dev before running these tests.
When I follow the procedure in #1 with the code in #29, I get the following output in the watchdog:

Location	http://problemsite1.com/files/advagg_css/css_missing14064593931307464075_0.css
Referrer	
Message	Array
(
    [0] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/includes/common.inc
            [line] => 1696
            [function] => eval
        )

    [1] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/php/php.module
            [line] => 81
            [function] => drupal_eval
        )

    [2] => Array
        (
            [function] => php_filter
        )

    [3] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/includes/module.inc
            [line] => 461
            [function] => call_user_func_array
        )

    [4] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/filter/filter.module
            [line] => 455
            [function] => module_invoke
        )

    [5] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/node/node.module
            [line] => 1050
            [function] => check_markup
        )

    [6] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/node/node.module
            [line] => 1091
            [function] => node_prepare
        )

    [7] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/node/node.module
            [line] => 1012
            [function] => node_build_content
        )

    [8] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/node/node.module
            [line] => 1771
            [function] => node_view
        )

    [9] => Array
        (
            [function] => node_page_default
        )

    [10] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/includes/menu.inc
            [line] => 349
            [function] => call_user_func_array
        )

    [11] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/index.php
            [line] => 17
            [function] => menu_execute_active_handler
        )

)

Interestingly, when I simply attempt to access a non-existent url, I get:

Location	http://problemsite1.com/NonExistentPage
Referrer	
Message	Array
(
    [0] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/includes/common.inc
            [line] => 1696
            [function] => eval
        )

    [1] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/php/php.module
            [line] => 81
            [function] => drupal_eval
        )

    [2] => Array
        (
            [function] => php_filter
        )

    [3] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/includes/module.inc
            [line] => 461
            [function] => call_user_func_array
        )

    [4] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/filter/filter.module
            [line] => 455
            [function] => module_invoke
        )

    [5] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/node/node.module
            [line] => 1047
            [function] => check_markup
        )

    [6] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/node/node.module
            [line] => 1091
            [function] => node_prepare
        )

    [7] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/node/node.module
            [line] => 1012
            [function] => node_build_content
        )

    [8] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/node/node.module
            [line] => 1107
            [function] => node_view
        )

    [9] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/modules/node/node.module
            [line] => 1803
            [function] => node_show
        )

    [10] => Array
        (
            [function] => node_page_view
        )

    [11] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/includes/menu.inc
            [line] => 349
            [function] => call_user_func_array
        )

    [12] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/includes/common.inc
            [line] => 381
            [function] => menu_execute_active_handler
        )

    [13] => Array
        (
            [file] => /home/talldave/public_html/problemsite1.com/index.php
            [line] => 23
            [function] => drupal_not_found
        )

)

To-date, I have never seen the status report for advagg throw a "Flush your caches" warning. Shouldn't drupal_not_found be called in both cases?

mikeytown2’s picture

can you run this code and paste in the output?


require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

$path = 'files/advagg_css/css_missing14064593931307464075_0.css';
$original_map = arg(NULL, $path);
$parts = array_slice($original_map, 0, MENU_MAX_PARTS);
echo str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($parts, TRUE))));
$data = menu_get_ancestors($parts);
list($ancestors, $placeholders) = $data;
echo str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($data, TRUE))));

$results = db_query('SELECT * FROM {menu_router} WHERE path IN (' . implode(',', $placeholders) . ') ORDER BY fit DESC', $ancestors);
$data = array();
while ($row = db_fetch_array($results)) {
  $data[] = $row;
}
echo str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($data, TRUE))));

It's a modified version of menu_get_item. And to answer your question advagg has a missing file handler, that should be called; but it is not. That is the issue we are dealing with.

TallDavid’s picture

AdvAgg debug #31 output

Array
(
    [0] => files
    [1] => advagg_css
    [2] => css_missing14064593931307464075_0.css
)
Array
(
    [0] => Array
        (
            [0] => files/advagg_css/css_missing14064593931307464075_0.css
            [1] => files/advagg_css/%
            [2] => files/%/css_missing14064593931307464075_0.css
            [3] => files/%/%
            [4] => files/advagg_css
            [5] => files/%
            [6] => files
        )

    [1] => Array
        (
            [0] => '%s'
            [1] => '%s'
            [2] => '%s'
            [3] => '%s'
            [4] => '%s'
            [5] => '%s'
            [6] => '%s'
        )

)
Array
(
    [0] => Array
        (
            [path] => files/advagg_css/%
            [load_functions] => a:1:{i:2;N;}
            [to_arg_functions] =>
            [access_callback] => 1
            [access_arguments] => a:0:{}
            [page_callback] => advagg_missing_css
            [page_arguments] => a:0:{}
            [fit] => 6
            [number_parts] => 3
            [tab_parent] =>
            [tab_root] => files/advagg_css/%
            [title] =>
            [title_callback] => t
            [title_arguments] =>
            [type] => 4
            [block_callback] =>
            [description] =>
            [position] =>
            [weight] => 0
            [file] => sites/all/modules/advagg/advagg.missing.inc
        )

)
mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB

That's weird. I'll make a special mode for you that you can set in your settings.php file to have it call the missing handler while in hook_init. This should take care of the issue your having. In your settings.php file add in

$conf['advagg_init_fastforward'] = TRUE;

Let me know if it works.

mikeytown2’s picture

That's weird. I'll make a special mode for you that you can set in your settings.php file to have it call the missing handler while in hook_init. This should take care of the issue your having. In your settings.php file add in

$conf['advagg_init_fastforward'] = TRUE;

Let me know if it works.

mikeytown2’s picture

StatusFileSize
new1.23 KB
TallDavid’s picture

I applied the patch to advagg.module and inserted the $conf line into my settings.php. No joy.

I then navigated to admin/settings/advagg/info, then to watchdog, to retrieve the new "advagg-404" entry, but, there was no new entry.

Mickey, I don't want to monopolize your time. I can live without AdvAgg on these 3 sites. However, I'm willing to keep testing/working on this issue if you think there is value.

[I'm off to ride some trails at Brazos Bend State Park. I'll check back in - in a few hours.]

mikeytown2’s picture

Status: Needs review » Postponed (maintainer needs more info)

Well, I'm going to mark this as postponed until we can better track this one down... I'm out of ideas at this point.

TallDavid’s picture

Status: Postponed (maintainer needs more info) » Postponed

One of the commonalities of the three problem sites is that they were all upgraded from Drupal 5 sites. One started it's life at Drupal 4.6. I'm not sure if it's relevant to this issue, but, it's better to over communicate!

I'm going to roll-back the AdvAgg installations on these 3 problem sites and focus on Drupal 7 upgrades.

@mikeytown2 / @peter bowey, thank you for your efforts and suggestions. Happy Trails.

Peter Bowey’s picture

@TallDavid
That is a great idea (CLEAN Drupal Base). More work for you, but a very positive outcome (D7)!

I know I had several (like) issues just upgrading D6.17 to D6.20
(most of these issues occurred with the (older) Drupal Database hanging onto old (retired) schema's).

Looks like we will not see you at 'advagg' for awhile, Mike is planning the D7 version.
http://drupal.org/node/1171546

cdracars’s picture

I seem to be having a simailar issue...

stdClass Object (
    [request] => GET /sites/default/files/advagg_css/css_missing8299648721308239207_0.css HTTP/1.0
Host: www.usao.edu
User-Agent: Drupal (+http://drupal.org/)

    [data] => <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>404 - File Not Found</title>
<meta name="keywords" content="404, page, file, URL, not, found, error">
<meta name="description" content="404 - File Not Found">
<link rel="stylesheet" type="text/css" href="http://yourdomain.com/stylesheet.css">
</head>
<body>
<h1>Not Found</h1>
<p>The requested page or file was not found:</p>
<p><b>www.usao.edu/sites/default/files/advagg_css/css_missing8299648721308239207_0.css</b></p>
<p>This could be because of a broken or outdated hyperlink, a typing error, or the page might not exist anymore.</p>
<p>Our <a title="Search" href="http://www.usao.edu/home/search/node/"><b>Search Page</b></a> 
might help find the page or a page that replaced it.</p>
<p>&nbsp;</p>
<hr>
Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 www.usao.edu, Port 80
</body>
</html>
    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array (
            [Date] => Thu, 16 Jun 2011 15:46:48 GMT
            [Server] => Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
            [Accept-Ranges] => bytes
            [Connection] => close
            [Content-Type] => text/html
        )
    [error] => Not Found
    [code] => 302
    [redirect_code] => 404
    [redirect_url] => http://m.usao.edu/sites/default/files/advagg_css/css_missing8299648721308239207_0.css
    [timer] => Array (
            [count] => 1
            [time] => 638.14
        )
)
mikeytown2’s picture

@cdracars
Do you have special rules in your setup for imagecache?

cdracars’s picture

Yes here it is.

// List of extensions for static files
 $exts = 'txt|png|gif|jpe?g|shtml?|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp|xml';
 
 // It is not an imagecache path, which we allow to go through Drupal
 if (!strpos($_SERVER['QUERY_STRING'], 'imagecache') && !strpos($_SERVER['QUERY_STRING'], '/advagg_')) {
   // It is not our main feed page
   if ($_SERVER['QUERY_STRING'] != 'rss.xml') {
     // Is it a static file?
      if (preg_match('/\.(' . $exts . ')$/', $_SERVER['QUERY_STRING']))
        // Just send a 404 right now ...
        {
        header('HTTP/1.0 404 Not Found');
        print '<html>';
        print '<head><title>404 Not Found</title></head>';
        print '<body><h1>Not Found</h1>';
        print '<p>The requested URL was not found on this server.</p>';
        print '</body></html>';
        exit();
     }
   }
}             
mikeytown2’s picture

If you notice, the HTML returned in #40 is not a fast404 so the code above (#42) isn't causing the issue. The way the error looks, it appears to be generated from apache. I would check your htaccess and httpd.conf files to see if you have a special configuration for imagecache.

cdracars’s picture

I've looked at both the .htaccess and .http-conf... and can't find a call for imagecache any where... Also removed imagecache to see if that had any effect.

mikeytown2’s picture

Does imagecache work on your setup? Try looking in your code base for some of the phrases in the html given in #40; like "This could be because of a broken or outdated hyperlink, a typing error, or the page might not exist anymore." or "The requested page or file was not found:"

cdracars’s picture

css_missing8299648721308239207_0.css this file does not exist on my system... exactly what the debug info (#40) says. As far as imagecache it works fine. I have yet to locate where those strings are generated from but am still looking. Thank you for your help... and creating the holy grail of aggregation modules.

Peter Bowey’s picture

Refer #46

Note: css_missing8299648721308239207_0.css is not meant to exist!
It is simply part of the advagg debug check process for correct 404 handling being sent back to Drupal + Advagg!

Here is a snapshot of a correct 'Asynchronous debug info' response (from my own D6 Server):

stdClass Object (
    [request] => GET /sites/peterbowey.com.au/files/advagg_css/css_missing8614919741308581838_0.css HTTP/1.0
Host: www.peterbowey.com.au
User-Agent: Drupal (+http://drupal.org/)

    [data] => <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p><a href="/">Home</a></p><!-- advagg_missing_fast404 --></body></html>
    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array (
            [Server] => nginx
            [Date] => Mon, 20 Jun 2011 14:57:17 GMT
            [Content-Type] => text/html; charset=utf-8
            [Connection] => close
            [Vary] => Accept-Encoding
            [Set-Cookie] => route=ee1df8df67f905227e33a175d8f4d110
            [X-Accel-Expires] => 0
            [Last-Modified] => Mon, 20 Jun 2011 14:57:18 +0000
            [Cache-Control] => no-cache, must-revalidate, post-check=0, pre-check=0
            [ETag] => "1308581838"
            [X-AdvAgg] => Failed Validation. Wrong Pattern.
        )
    [error] => Not Found
    [code] => 404
    [timer] => Array (
            [count] => 1
            [time] => 53.1
        )
)



The very important [advagg] key element is this: [X-AdvAgg] => Failed Validation. Wrong Pattern
@cdracars: I note that your response has this: [code] => 302
This is a HTTP redirect ["Moved Temporarily"] on your Apache 404! So check your .htaccess || http.conf processing.

mikeytown2’s picture

That is correct, the file is missing. AdvAgg has a missing file handler and for some reason it's not being called; thats what the debug output is saying from the test. Imagecache also has a missing file handler and it's located in the files directory; thus they are very similar. Imagecache has been around for a long time thus support for it is usually hard coded in.

cdracars’s picture

@peter bowey: I am unfortunately using a stock .htaccess from drupal 6.22.

Peter Bowey’s picture

@cdracars

Notes 1: Advagg additionally writes this supplement to the stock .htaccess:

<FilesMatch "^css_[0-9a-f]{32}_.+\.css(\.gz)?">
  <IfModule mod_expires.c>
    # Enable expirations.
    ExpiresActive On
    # Cache all aggregated css files for 1 year after access (A).
    ExpiresDefault A31556926
  </IfModule>
  <IfModule mod_headers.c>
    # Unset unnecessary headers.
    Header unset Last-Modified
    Header unset Pragma
    # Make these files publicly cacheable.
    Header append Cache-Control "public"
  </IfModule>
  FileETag MTime Size
</FilesMatch>

This occurs both in the /files/advagg_css directory -and- the /files/advagg_js directory (so the above .css references change to .js)


Notes 2: It could be helpful to set Apache to send 404's to /index.php?q=$uri (= Drupal PHP). This would be a proof test/check of D6 404 handling. I use similar in my Nginx 2nd domain CDN setup to keep advagg 'happy'.

*Your 'HTTP 302' response does not look like Drupal is handling 404's*

cdracars’s picture

There are no edits to my .htaccess as their should be.. and on the Apache edit.. I am still pretty new to working with Apache so I'm not sure how to go about doing that.

Peter Bowey’s picture

@cdracars

In your Apache .htaccess -or- http.conf file, add this:

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php?q=$uri

Currently, I am far more conversant with Nginx code than with Apache 2.x, but I did utilize Apache a lot - once :)

*Notes: Target the .htaccess file in your Drupal root folder for the edit!
If you cannot see / find that file, then you are probably on a hosted / rented site that by default 'hides' such files.
You have several ways to deal with that, but that is to be your homework :)

cdracars’s picture

I have altered my .htaccess to have the

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php?q=$uri

.

No changes however... thanks for pointing me in the right direction as to where to add the change.

Peter Bowey’s picture

@cdracars

Thanks for doing the test.

1) It is important the order that you place the above .htaccess change.
Ideally, you need to place it such that it over-rides other Apache 'diverts'.

2) Have you located the 'reason' on the 302 redirect? That is a real problem!

cdracars’s picture

I am looking into the 302 redirect now... I have the module working without a hitch on my local dev box but on two servers I am getting the 302 error...

Peter Bowey’s picture

Refer #55

@cdracars: Good idea, for Drupal does not normally produce a 'HTTP 302 redirect' unless you install some special Drupal Modules. And that could be a 'pass catch' for Advagg 404 handling.

cdracars’s picture

Started working on all but a shared host site... Could the hosting be part of the problem? Also still unable to find what is causing the 302 because it just started working on my other sever.

alladdin’s picture

I have enabled fast 404 module and now on status page I get error for Advagg.

1. Settings.php has been modified to
if (!strpos($_SERVER['QUERY_STRING'], 'imagecache') && !strpos($_SERVER['QUERY_STRING'], '/advagg_')) {
2. IP Address to send all asynchronous requests set to '-1'
3. All caches cleared, menu cache cleared twice.

No success.

My Asynchronous debug info:

stdClass Object (
    [request] => GET /sites/default/files/advagg_css/css_missing15369055931310826570_0.css HTTP/1.0
Host: www.thaiholiday.ru
User-Agent: Drupal (+http://drupal.org/)
Connection: close

    [data] => <html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Page not found</h1><p>The requested URL "/sites/default/files/advagg_css/css_missing15369055931310826570_0.css" was not found on this server.</p></body></html>
    [protocol] => HTTP/1.0
    [status_message] => Not Found
    [headers] => Array (
            [Date] => Sat, 16 Jul 2011 14:29:31 GMT
            [Server] => Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.9
            [X-Powered-By] => PHP/5.2.9
            [Content-Length] => 253
            [Connection] => close
            [Content-Type] => text/html
        )
    [error] => Not Found
    [code] => 404
    [timer] => Array (
            [count] => 1
            [time] => 1436.71
        )
)

And:

stdClass Object (
    [request] => GET /index.php?q=sites/default/files/advagg_css/css_missing15369055931310826570_0.css HTTP/1.0
Host: www.thaiholiday.ru
User-Agent: Drupal (+http://drupal.org/)

    [data] => <html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Page not found</h1><p>The requested URL "/index.php?q=sites/default/files/advagg_css/css_missing15369055931310826570_0.css" was not found on this server.</p></body></html>
    [protocol] => HTTP/1.0
    [status_message] => Not Found
    [headers] => Array (
            [Date] => Sat, 16 Jul 2011 14:29:32 GMT
            [Server] => Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.9
            [X-Powered-By] => PHP/5.2.9
            [Content-Length] => 265
            [Connection] => close
            [Content-Type] => text/html
        )
    [error] => Not Found
    [code] => 301
    [redirect_code] => 404
    [redirect_url] => http://www.thaiholiday.ru/index.php?q=sites/default/files/advagg_css/css_missing15369055931310826570_0.css
    [timer] => Array (
            [count] => 1
            [time] => 188.69
        )
)

Thank you for your help

mikeytown2’s picture

The fast 404 module is different from the settings.php script.

The directions I have are for the settings.php script. Here is the issue for the module #1166622: AdvAgg, Fast 404: Support for AdvAgg

mikeytown2’s picture

Status: Postponed » Active
tjharman’s picture

I've found the problem!!!! (I think?)

My /files/ directory has this .htaccess in it!

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
<IfModule mod_rewrite.c>
  RewriteEngine off

As soon as I removed that - everything worked.

I hope that helps people fix this issue.

Now my question is - can I remove that now??

Tim

mikeytown2’s picture

The default files dir .htaccess should be

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

Gets created by file_check_directory

tjharman’s picture

Right, but this is my Drupal install from 4.x that I've slowly upgraded over the years.

Is it possible this is a hangover from a long time ago? I wonder if the people having problems are in a similar situation?

mikeytown2’s picture

Sounds like the status page needs a test to see if RewriteEngine off is set in the .htaccess file.

TallDavid’s picture

Version: 6.x-1.x-dev » 6.x-1.4
Status: Active » Fixed

The 3 sites that have the same 'Adv CSS/JS Agg - Asynchronous Mode Set to FALSE' issue were all older sites (#38) that began life in Drupal 4 or 5 and had the old-style .htaccess in the \files directory as reported in #61.

For each of the 3 problematic sites, I changed the .htaccess files to the current code (as noted in #62), installed the latest 6.x-1.4 version of the AdvAgg module and the problem is resolved on all sites. Yeah!

Thanks to mikeytown2 for his hard work on this project, to peter bowey for his troubleshooting suggestions and to tjharman for the spark that provided the solution.

mikeytown2’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
StatusFileSize
new2.26 KB

committed code that will check files/htaccess to see if "RewriteEngine off" exists if async doesn't work.

Status: Fixed » Closed (fixed)

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