My sites is setup as a multilingual with url suffixes such as en.

There seems to be some kind of issues with this module when enabled when fetching the css and js files. When you look as what's it's trying to fetch it keeps adding the prefix so you end up with urls like en/en/en/en and it doesn't load the files.

Comments

marcus178’s picture

Actually this only happen with HTTPRL enable so I guess it's a issue with that.

mikeytown2’s picture

Thanks this helps to narrow it down. What modules are you using for multilingual support?

mvantuch’s picture

I'm experiencing the same issue. Modules I am using:
Entity Translation
Internationalization
Field translation
Multilingual content
Path translation
Translation redirect (guess this might have something to do with it?)
Variable translation

Kind of messy, I know :) I could try to narrow it down if needed.

marcus178’s picture

After turning off the HTTPRL integration it does seems better although it still seems to do it on the odd occasion.

I'm using

Entity Translation
Field translation
Internationalization
Menu translation
Multilingual content
Taxonomy translation
String translation

mikeytown2’s picture

https://drupal.org/project/i18n
Internationalization
Field translation
Multilingual content
Taxonomy translation
String translation

Menu translation
Translation redirect
Variable translation

https://drupal.org/project/entity_translation
Entity Translation

mikeytown2’s picture

What's your configuration on admin/config/regional/language/configure?

mvantuch’s picture

StatusFileSize
new60.84 KB
mikeytown2’s picture

$language->direction is used in locale_css_alter.

$language->language is used in locale_js_alter Looks like _locale_rebuild_js uses the $GLOBALS['language'] object so I should just add this into the advagg hash and have it reload on 404/httprl usage

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new2.38 KB

Created this patch. Looking over the code and this issue should only happen for CSS. The internals of JS should be the same.

References to the CSS/JS file could still be an issue if drupal_render isn't working as I expect.

mikeytown2’s picture

patch in #9 has been committed.

mikeytown2’s picture

Status: Needs review » Fixed
marcus178’s picture

I have updated to the latest dev but I still see the same issue with HTTPRL enabled

mikeytown2’s picture

Status: Fixed » Active
joekiddo’s picture

Thanks for the patch it seems to work better but I still get some /en/en/en/ urls at times. In fact I have to disable the module for now on the production site. I'm running drupal behind HAProxy though with two nodes. The default folder is being rsynced between the two nodes to ensure both nodes have the same aggregragated js/css.

Hope this helps in finding a solution for this.

Thanks for the awesome work mikey

mvantuch’s picture

Just tried it now and still got the error and also it happened to a JS file rather than a CSS one.

Failed to load resource http://[domain]/cs/cs/cs/cs/cs/cs/cs/cs/cs/cs/cs/cs/cs/cs/cs/cs/cs/…cnia3rAAefsVQN8FGhS_LvRn4A__vvv58fy0lB_boAniWHAaQ9nkxR1m3ckgCirug1ITYRw.js

mvantuch’s picture

Got this message on the reports page today - might help...

Adv CSS/JS Agg - HTTP Request HTTP requests to advagg for css files are not getting through.
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 is missing as something else is handling the 404 before AdvAgg has a chance to do it. If you are reading this, it means that something else is handling the 404 before AdvAgg can. Raw request info:
stdClass Object
(
[request] => GET /cs/sites/default/files/advagg_css/css__1391004279.css HTTP/1.0
User-Agent: Drupal (+http://drupal.org/)
Host: [domain]

[code] => -1
[error] => request timed out
[redirect_code] => 301
[redirect_url] => http://[domain]/cs/sites/default/files/advagg_css/css__1391004279.css
)

mikeytown2’s picture

On one of the pages that has this error can I get a peak at the raw html? Is it getting rendered correctly and then being redirected to /cs/cs/cs/...?

mikeytown2’s picture

Status: Active » Fixed
StatusFileSize
new3.27 KB

Think #2070201: Make compatible with the subdomain module is to blame.
Committed this patch which should take care of the issue.

marcus178’s picture

That certainly seems to have fixed it. Thank you

mikeytown2’s picture

StatusFileSize
new581 bytes

Following patch has been committed

Status: Fixed » Closed (fixed)

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