Closed (fixed)
Project:
Advanced CSS/JS Aggregation
Version:
6.x-1.x-dev
Component:
JS CDN
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 May 2011 at 15:09 UTC
Updated:
11 Jun 2011 at 00:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
mikeytown2 commentedjust to double check, are you using HeadJS or LABjs or another JS loader script? If you are, try it with that loader disabled.
Comment #2
mrfelton commentedI'm not using any special JS loader.
Comment #3
mrfelton commentedThe swfobject.js isn't getting loaded onto the page. The only thing that I can see that is slightly different from standard about how this gets loaded onto the page, is that it lives in the libraries directory instead of the module directory.
This is called from within hook_init:
Comment #4
mikeytown2 commentedon the page that is throwing the error, add on ?advagg-debug=1 and then copy the watchdog output here in a code tag.
Comment #5
mrfelton commentedHere ya go!
Comment #6
mrfelton commentedHmm. paste didn't work... http://pastebin.com/yMQqJttZ
Comment #7
izmeez commentedsubscribing
Comment #8
mikeytown2 commentedlooking at the debug ouput and all files that are in the bundles are correct. Any JS files give you a 404? What happens when you do ?advagg=0
Can I get the line number and filename of where the JS error occurs? Also the file's contents of
js_97af7b6ad5c97f4044190eebaaeff1d0_0.jsand the file where the error is thrown.Comment #9
mrfelton commentedNo JS files give a 404.
With ?advagg=0 swfobject.js is loaded onto the page and there are no errors.
With advagg=1, swfobject.js is not included in any of the bundles, and the js error comes from within the node body, since swfobject is called via swftools's input format (by entering
[swf file=path/to/file]in the node body.Comment #10
mrfelton commentedThis is the content of the js bundle which is supposed to contain swfobject.js: http://pastebin.com/aW2bu4nS. It's clearly not in there.
Comment #11
mrfelton commentedTacked the problem down to this line...
Comment #12
mrfelton commentedDisabling the advagg_js_compress module resolves the issue.
Comment #13
mikeytown2 commentedI'll need to add in smarter checks for the JSMin+ code. Sounds like after it got compressed it returned an empty string.
Comment #14
mikeytown2 commentedmind testing this patch?
Comment #15
mrfelton commentedYeah, that seems to do it :)
Comment #16
mikeytown2 commentedThanks for testing!
committed http://drupalcode.org/project/advagg.git/commit/b2e8916
Comment #17
mrfelton commentedThanks for fixing!!
Comment #18
mrfelton commentedI'm running into this issue again with the latest -dev snapshot. Odd thing is, it's only an issue in Internet Explorer. Works fine in Chrome
Comment #19
mikeytown2 commentedWhat version of IE? Are you using CSS Embedded Images? IE released a breaking update if your using that module. Do you get a line number error from the JS? If Yes, Any chance you could attach the file that its bombing on and paste the error from IE.
Comment #20
mrfelton commentedThis is a problem in IE 7 and 8.
I'm not using CSS Embedded Images.
There is no specific JavaScript error being reported by IE, but SWFTools fails to load the Flash file onto the page as it says that flash components can not be found. This is the exact same symptom as before when SWFObject was not getting included into the JS, although this time, it does look as if the swfobject.js code is included in the minified javascript.
Disabling advagg gets everything working again. So does switching from the swfobject embedding method to direct embedding - presumably because it's not relying on the swfobject.js to do the embedding.
Comment #21
mikeytown2 commentedTry upgrading to the lastest version of the swftools library
http://drupal.org/node/303203
If you turn off JS compression does the problem go away? After disabling the module be sure to go to admin/settings/advagg/config and do either a Cache Rebuild OR Forced Cache Rebuild OR a Master Reset so that the compressed JS will no longer be accessed.
Are you using LABjs Or HeadJS? If yes, disable them and see if the error goes away.
Comment #22
mikeytown2 commentedNeed to know if the latest SWFTools library fixes this issue.
Comment #23
mrfelton commentedSorry, no joy...
I still have this problem with the latest swftools and the latest advagg module.
Same problem with javascript compression disabled too.
Flushing caches at /admin_menu/flush-cache/advagg makes no difference.
I'm not using HeadJS or LABjs.
Comment #24
mikeytown2 commentedGoing to make an option to get the SWFTools library from Google's CDN in the JS CDN module.
Patch has been committed, let me know if it doesn't fix the issue.