Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I'm using BOA (Barracuda Octopus Aegir) LEMP stack with Pressflow 6.22 and your module. I've enabled all Advagg modules, and configured a server-writable / public-readable directory in Advagg for aggregate file storage (Drupal is using private file system). However, it does not seem my css/js are being aggregated. In Chrome debugger, I still see all separate files.
I'm not sure if it's related, but Async mode is reporting an issue in my site status:
Adv CSS/JS Agg - Asynchronous Mode Set to FALSE.
Check to see if you have fast 404s, if so create an exception for this module. The readme file explains what needs to be changed. You can try flushing the menu cache as well. If you are still having issues you can go to the AdvAgg information tab and select Asynchronous debug info. If creating an issue on d.o be sure to include this information .
Here is the async debug info:
stdClass Object (
[request] => GET /sites/portal.praece.com/files/portal.praece.com/advagg_css/css_missing8852429961313558365_0.css HTTP/1.0
Host: portal.praece.com
User-Agent: Drupal (+http://drupal.org/)
Connection: close
[data] => <html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>Barracuda/1.0.5</center>
</body>
</html>
[protocol] => HTTP/1.1
[status_message] => Not Found
[headers] => Array (
[Server] => Barracuda/1.0.5
[Date] => Wed, 17 Aug 2011 05:19:25 GMT
[Content-Type] => text/html
[Content-Length] => 172
[Connection] => close
[Vary] => Accept-Encoding
)
[error] => Not Found
[code] => 404
[timer] => Array (
[count] => 1
[time] => 0.47
)
)
Comment | File | Size | Author |
---|---|---|---|
#33 | advagg-1251588-33-no-conf-in-path.patch | 1022 bytes | mikeytown2 |
#20 | advagg-1251588-20.patch | 624 bytes | mikeytown2 |
#11 | advagg_settings.png | 59.31 KB | obrienmd |
#11 | filesystem.PNG | 29.99 KB | obrienmd |
#7 | Capture.PNG | 68.97 KB | obrienmd |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedLooks like Barracuda is not letting the request hit drupal if the page is missing. #1116618-11: Need a nginx setup doc might be helpful.
Comment #2
obrienmd CreditAttribution: obrienmd commentedMoving this over to Barracuda. Any thoughts from the omega8cc team?
Comment #3
omega8cc CreditAttribution: omega8cc commentedHave you set this config option? - see the screenshot attached.
We probably have to force it in the global.inc file.
Comment #4
omega8cc CreditAttribution: omega8cc commentedSee also: #1142990: Why SERVER_ADDR is used instead of HTTP_HOST to build $url in function advagg_css_js_file_builder() ?.
Comment #5
obrienmd CreditAttribution: obrienmd commentedomega8cc: will test as per #3 and report back. If it works, I agree it should be set in global.inc :)
Comment #6
obrienmd CreditAttribution: obrienmd commentedTried #3, still getting:
Comment #7
obrienmd CreditAttribution: obrienmd commentedSee attachment for settings. Won't let me set async due to error above. I'm using sites/site/files instead of the private drupal file system to store files so anonymous users can access them.
Comment #8
obrienmd CreditAttribution: obrienmd commentedUpdated to latest Barracuda (8.10) and Advagg (6.x-1.x-dev). Still getting the following async debug info:
Default file system is private, but have set advagg to a directory that should be web-user readable (/sites/sitename/files).
Comment #9
omega8cc CreditAttribution: omega8cc commentedWe didn't debug it yet, but I don't understand why there is:
[request] => GET /sites/portal.praece.com/files/portal.praece.com/advagg_css/css_missing20525872421315500084_0.css
instead of:
[request] => GET /sites/portal.praece.com/files/advagg_css/css_missing20525872421315500084_0.css
There is nothing in the Nginx config which could cause this.
Any idea?
Comment #10
omega8cc CreditAttribution: omega8cc commentedAlso, could you post details about your private files/downloads setup/settings?
Comment #11
obrienmd CreditAttribution: obrienmd commentedRe: #9, no clue, will poke around advagg's debug code :)
Re: #10:
-See attachments for Drupal File System and AdvAgg settings-
The idea is that while this site requires a private file system, AdvAgg 'should' allow me to set its path to a directory which is directly served by the web server, thus allowing anonymous users to download aggregated css and js.
Comment #12
obrienmd CreditAttribution: obrienmd commentedOK, I did some debugging regarding the odd extra hostname in the files dir:
It occurs in advagg_get_root_files_dir, a function in advagg:
Before this snippet is run in that function, $custom_path is
sites/portal.praece.com/files
.After this snippet is run $custom_path is
sites/portal.praece.com/files/portal.praece.com
.The funky directory is writable by www-data. However, I'm not sure how Barracuda's nginx / global.inc are affecting it.
Comment #13
omega8cc CreditAttribution: omega8cc commentedSo it is either bug in the AdvAgg module or you should use just "files" as a 'custom' path - or maybe just "/" ?
Anyway, it doesn't work with this funky path because it doesn't match the location we have for AdvAgg support: http://drupalcode.org/project/barracuda.git/blob/HEAD:/aegir/conf/nginx_...
location ~* files/advagg_(?:css|js)/ {
And since it doesn't match defined location, it is not send to Drupal for processing if the file doesn't exist yet.
Comment #14
obrienmd CreditAttribution: obrienmd commentedadvagg setup rejects files or / as custom path, saying they are not writable. I'm inclined to this this should be fixed in advagg. If it's not a slam-dunk for the maintainer or someone smarter than me, perhaps I'll go in and hack around to see if I can make a patch.
Moving this back over to advagg - any ideas on this from anyone?
Comment #15
obrienmd CreditAttribution: obrienmd commentedOK, here's the issue - When advagg takes a custom path, it appends the conf_path() to that custom path. Not sure why it does this, but I can think of a few possible good reasons.
So, two possible solutions:
1) Add to current
location ~* files/advagg_(?:css|js)/
the option forlocation ~* files/.*/advagg_(?:css|js)/
(excuse if my regex is poor, I don't really know how to create them) so Drupal handles that URL.2) Push advagg to ask why conf_path() result is added to custom path.
Any thoughts?
Comment #16
mikeytown2 CreditAttribution: mikeytown2 commentedconf_path is added for multisites. The file names are unique but are not globally unique. Next major version of advagg I plan on making them globally unique so all aggregates can safely live in the same directory.
Comment #17
obrienmd CreditAttribution: obrienmd commentedI see - I guess that makes sense... I assumed (incorrectly) that the user would cover that in the custom path as I did :)
Comment #18
obrienmd CreditAttribution: obrienmd commentedMoving this back over to advagg, as mikeytown2's addition of globally unique file names (or rather, the associated removal of appended conf_path in the path) will fix this.
Comment #19
obrienmd CreditAttribution: obrienmd commentedOops, wrong advagg :)
Comment #20
mikeytown2 CreditAttribution: mikeytown2 commentedI'll create a hidden setting to control if conf_path is added to the path. Hidden as in one that can not be set in the GUI but can be set in settings.php by the
$conf
global. This patch work for you after adding this to your settings.php file?Comment #21
obrienmd CreditAttribution: obrienmd commentedThat definitely removed the conf path, however page loads really slowed down and a good number of pages are showing up unstyled. Seems like Drupal is handling the URL, though, and and AdvAgg header item is grabbed.
Comment #22
mikeytown2 CreditAttribution: mikeytown2 commentedIs this still and issue with the latest dev version?
Comment #23
obrienmd CreditAttribution: obrienmd commentedI will update to latest dev right now and let you know. Our users are definitely still having many issues, mostly clearing the browser caches helps (which is curious)... But turning off advagg also fixes the issues.
Comment #24
mikeytown2 CreditAttribution: mikeytown2 commentedComment #25
obrienmd CreditAttribution: obrienmd commentedOK, latest dev:
stdClass Object (
[request] => GET /sites/portal.praece.com/files/advagg_css/css_missing11227634041323929898_0.css HTTP/1.0
Host: portal.praece.com
User-Agent: Drupal (+http://drupal.org/)
Connection: close
[data] =>
404 Not Found
Not Found
The requested URL was not found on this server.
Home
[protocol] => HTTP/1.1
[status_message] => Not Found
[headers] => Array (
[Server] => Barracuda/1.0.6
[Date] => Thu, 15 Dec 2011 06:18:18 GMT
[Content-Type] => text/html; charset=utf-8
[Connection] => close
[Vary] => Accept-Encoding
[X-Powered-By] => PHP/5.2.17
[X-Accel-Expires] => 0
[X-Drupal-Cache] => MISS
[Last-Modified] => Thu, 15 Dec 2011 06:18:18 +0000
[Cache-Control] => no-cache, must-revalidate, post-check=0, pre-check=0
[ETag] => "1323929898"
[X-AdvAgg] => Failed Validation. Wrong Pattern.
)
[error] => Not Found
[code] => 404
[timer] => Array (
[count] => 1
[time] => 84.77
)
)
Comment #26
udvranto CreditAttribution: udvranto commentedI am having the same issue. No files generated. files/advagg_js and files/advagg_css are writable. I am using a private file system.
Comment #27
udvranto CreditAttribution: udvranto commentedAs soon as I changed to public file system mode, it started working!
Comment #28
mikeytown2 CreditAttribution: mikeytown2 commentedIs this issue resolved?
Comment #29
obrienmd CreditAttribution: obrienmd commentedI have been on a different project for a while now, but intend to get back into this early next month. If it is still acting up, I'll let you know. Perhaps we can meet up to hack on it if so, ksenzee said you're Seattle local I think, is that right?
Comment #30
mikeytown2 CreditAttribution: mikeytown2 commentedI am a Seattle local; live/work on the east side.
Comment #31
obrienmd CreditAttribution: obrienmd commentedCool, I will send ping you when I've tested further early next month.
Comment #32
obrienmd CreditAttribution: obrienmd commentedAfter a bit of testing, it looks like this is working, with your patch and settings.php declaration in #20. Is it sane for that patch to be committed (i.e. will it not screw things up for folks with more generic setups)?
Comment #33
mikeytown2 CreditAttribution: mikeytown2 commented@obrienmd
I have a slightly different patch in comparison to #20. Could you test this one?
Comment #34
obrienmd CreditAttribution: obrienmd commentedWorked for me! Thanks!
Comment #35
mikeytown2 CreditAttribution: mikeytown2 commented#33 has been committed.
Comment #36
obrienmd CreditAttribution: obrienmd commentedThanks again, this is great.