Closed (fixed)
Project:
Advanced CSS/JS Aggregation
Version:
7.x-2.0-rc1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2013 at 08:26 UTC
Updated:
27 Aug 2015 at 20:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sprice commentedI've got basically the same problem.
On the status report, I get the 404 on a path reported as something like "/sites/default/files/advagg_css/css1376292519.css"
However, none of the files that I have in that directory look anything like that. Instead, they look like this:
css__Xnx_YvKoFE3EEVqlfR6AlvMT9XmE19mYSTLVptcBdXQ__8__R8A19zEb3SlSuSpmWG-1AO3J5mgTekAy4eK6T9Z4__tH52p8_sEdn0OdPShqrvEBc_cRmygTb7EuB4PshMsrA.csscss__Xnx_YvKoFE3EEVqlfR6AlvMT9XmE19mYSTLVptcBdXQ__8__R8A19zEb3SlSuSpmWG-1AO3J5mgTekAy4eK6T9Z4__tH52p8_sEdn0OdPShqrvEBc_cRmygTb7EuB4PshMsrA.css.gzIt does seem to work on the regular pages though. Is there just a different call being done on the status page vs the regular pages?
Comment #2
mikeytown2 commentedI should explain the failure of the test better in that status message.
On the status report page, AdvAgg will issue a request for a file that does not exist inside of the AdvAgg directory. If AdvAgg sends a 404, everything is ok; if something else sends a 404 then that means that AdvAgg will not be able to generate an aggregate if it's missing as something else is handling the 404 before AdvAgg has a chance to do it.
@iler
In your case it looks like Nginx is sending the 404 before AdvAgg has a chance to do it.
Comment #3
mikeytown2 commentedFollowing patch has been committed. Will explain the failure better.
Comment #4
sprice commentedOh. That explanations makes the problem make perfect sense now. I'm also running nginx, so my 404 rules are probably a bit too strict considering that advagg will send the 404 for me. I'll just loosen those nginx rules and let adv agg do it's thing.
Comment #5
mikeytown2 commentedGoing to mark this as fixed. Let me know if I'm mistaken :)
Comment #6
mikeytown2 commentedComment #7
sprice commentedI fixed this error with mine. In case anyone stumbles across this thread in the future, I'll explain.
My nginx setup pretty much comes straight from Perusio's complex configuration that he made available (https://github.com/perusio/drupal-with-nginx). There are two advagg blocks in the apps/drupal/drupal.conf file, one for advagg_css and one for advagg_js. You need to remove the line
try_files $uri @drupal;from those blocks because it is a directive telling nginx to see if the file exists before letting anything through.That was it for me. Hope this helps anyone who stumbles across the thread in the future.
Comment #9
marcialsoto commentedI get these error message but i'm on CentOS 7... (Apache)
Comment #10
mikeytown2 commentedmarcialsoto
Open up a new issue as a support request with the whole error message.
Comment #11
Talkless commentedI also need better explanation about this issue.
Same problem on shared hosting and on my Ubuntu 12.04 virtual machine (both Apache), and I cannot find anything in advagg documentation about configuring .htaccess or drupal or whatever, to make this 404 handling work.
In my case, status page prints these messages:
And for CSS:
And yes, if I enter beta.MYSITE.com/sites/default/files/advagg_js/js__1440693838.js into browser, I do actually get Apache generated "not found" page.
How should I and other posters could fix it?
Comment #12
mikeytown2 commented@Talkless
It depends on the server configuration; thus there is no easy answer.