Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Generate CSS/JS files on request (async mode) is disabled. I am using fast 404 and have this in the settings.php:
// List of extensions for static files
$exts = 'txt|png|gif|jpe?g|shtml?|css|js|ico|swf|flv|cgi|bat|pl|dll|exe';
// 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();
}
}
}
I tried flushing cache...
Comments
Comment #1
meba CreditAttribution: meba commentedOK, this is crazy. We are using Domain Access and it worked from a different domain.
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedany other info you can think of to help debug this?
Comment #3
meba CreditAttribution: meba commentedWe have a site using boost + domain access module. It didn't work from one of the domains but worked from the other.
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedsame setup as me. Any path prefixing or i18n?
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedgoing to mark this closed; have a feeling this got fixed in one of the many commits I did.
Comment #6
_-. CreditAttribution: _-. commentedi've installed advagg 6.x-1.x-dev.
with either fast404's turned on, with the config exactly as above in the OP, or fast404's uninstalled/disabled, i'm unable to select/toggle the 'Generate CSS/JS files on request (async mode)' option. it's off and unavailable.
iiuc, i've no specific path prefixing or i18n enabled.
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedgoing to mark this as a dup of this issue #1132878: Can't enable async mode with open atrium - Add in html comment to fast404 & check for that as well
Trying to keep similar issues in the same issue
Comment #8
Michsk CreditAttribution: Michsk commentedThis can also have something to do if you block all ip's except your own (for development for example). This is what was the issue for me. After commenting out the htaccess rule and allowing every ip, async mode was enabled and i could turn it on.
Comment #9
shunting CreditAttribution: shunting commentedIn the D7 version, the PHP code above worked for me to get async going (and files compressing) when I pasted it at the end of settings.php.
I tried enabling the Fast 404 in settings.php as the comments suggest, that that did not enable async. So I commented them out again, pasted in the material above (even if it does come from the D6 era) and everything worked and CSS and JS are now being compressed!