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.
hi-
the javascript files on my site that compressed using javascript_aggregator do not compress with this module. my css files are getting compressed. am i doing something wrong?
thx!
Comment | File | Size | Author |
---|---|---|---|
#13 | advagg-bugfix-1080986-13.patch | 12.53 KB | mikeytown2 |
#12 | advagg-info-1080986-12.patch | 8.97 KB | mikeytown2 |
#8 | advagg-debug-1080986-7.patch | 963 bytes | mikeytown2 |
#4 | advagg-debug-1080986-3.patch | 1.39 KB | mikeytown2 |
Comments
Comment #1
mudjunky CreditAttribution: mudjunky commentedi tracked the problem down to one of my js files that javascript_aggregator with jsmin+ enabled shows as "Parse error: Illegal token in file '[inline]' on line 2752 "
i looked in the advagg watchdog to see what the offending file was, but all i got was "Debug info: !data" -- where can i tell what files bombed?
thanks
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedCan I get more details? What files are not getting compressed? Do any get compressed?
Comment #3
mudjunky CreditAttribution: mudjunky commentedi get a compressed link, but the contents in the file are not compressed. it's just one giant javascript file with the contents of all my javascript files.
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedin your database run this query & paste the output here.
Looks like I could use an info tab for displaying data like this.
thanks for the heads up with debug not working. committed this patch. it will fix debug but not this issue.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedThis is what happens when jsmin+ bombs on a JS file. rather then giving you no JS it gives you the aggregated version. jsmin+ likes to bomb on files that have already been minified. Reminds me, I should minify everything above and below the offending file & include the file, as it is, in the aggregate.
Comment #6
mudjunky CreditAttribution: mudjunky commented----------+
| filename | data |
+----------------------------------------------------------------+--------------------------------------------------------------------------------+
| sites/all/modules/jquery_update/replace/jquery.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| misc/drupal.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/fb/fb_connect.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/fb/fb_stream.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/fb/fb.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/fivestar/js/fivestar.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/flag_friend/flag_friend.popups.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/lightbox2/js/auto_image_handling.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/lightbox2/js/lightbox.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/swfobject/swfobject/src/swfobject.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/admin_menu/admin_menu.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/popups/popups.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| themes/garland/popups-skin.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| misc/tableheader.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| misc/collapse.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/jquery_update/replace/jquery.form.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| misc/textarea.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/themes/custom/popups-skin.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/flag/theme/flag.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/themes/custom/js/base.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/themes/custom/js/jquery.tooltip.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/views/js/base.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
| sites/all/modules/views/js/ajax_view.js | a:1:{s:18:"advagg_js_compress";a:1:{s:6:"tested";a:1:{s:9:"jsminplus";i:-1;}}} |
+----------------------------------------------------------------+--------------------------------------------------------------------------------+
Comment #7
mudjunky CreditAttribution: mudjunky commentedok thanks for the head's up. great idea on above/below. i want to find this pesky file!
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedhmmm they are all -1. Looks like this bit of code is not working on your server. Sounds like I need to test it first before relying on it and have this on the status page.
What this does is issue a POST to the menu_callback for advagg_js_compress_test_file.php. I like to name most callbacks .php as that allows one to swap in a php file for faster performance. If I test the file in this process, odds are it will kill PHP if jsmin+ fails. Thus I test in another process and test the return value. If return value doesn't match then I assume jsmin+ failed on that file.
I did fix a bug in here, but sadly this bug wouldn't be fixing your issue. Patch attached.
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedBTW what does your status page say in regards to AdvAgg?
Comment #10
mudjunky CreditAttribution: mudjunky commentedman you're on it.
Comment #11
mudjunky CreditAttribution: mudjunky commentedStatus page has an error: Adv CSS/JS Agg - Asynchronous Mode Set to FALSE.
i have this code snippet at the bottom of settings.php. i still get the status error if i remove it. (no other fast 404's on my setup that i know of.)
Comment #12
mikeytown2 CreditAttribution: mikeytown2 commentedStill doesn't fix the callback issue but it will now compress the files if it the callback isn't working. In short your back to javascript_aggregator with jsmin+.
Now I need to make it skip bad files.
Comment #13
mikeytown2 CreditAttribution: mikeytown2 commentedComment #15
Michsk CreditAttribution: Michsk commentedI'm not getting this, was this fixed or not, since i'm having the same issue. Can i do something to help testing / reporting?
Comment #16
mikeytown2 CreditAttribution: mikeytown2 commented@lasac
The code was committed; but you could have a new issue here. Please provide as much information as possible.
Comment #17
jtsnow CreditAttribution: jtsnow commentedThe patch that I posted here should fix this: http://drupal.org/node/1186106#comment-5059064
Comment #18
Michsk CreditAttribution: Michsk commentedFirst of all my report states:
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 .
Tough i have made the settings.php changes for the fast 404.
Next up the the info from the advagg information tab:
Here's the result from the querey you asked from the issue starter:
The log's dont show any errors. Please let me know what more i can supply.
Also did this:
If this is still an issue you can try setting the
"IP Address to send all asynchronous requests to" setting on the
admin/settings/advagg/config page to -1. This will use the hostname instead of
an IP address when making the http request.
Comment #19
Michsk CreditAttribution: Michsk commentedPS; im having this with 6-1.5
//edit: using latest dev didn't fix it.
Comment #20
mikeytown2 CreditAttribution: mikeytown2 commented@lasac
Try the dev that will come out in 3 hours.
As for Asynchronous Mode getting that working would be a good idea. Sounds like you restrict access at the apache level; any way to allow advagg through?
Comment #21
Michsk CreditAttribution: Michsk commentedNot sure, could you tell me more on how to achieve this?
Got my first error when trying to increment and rebuild aggegrated files
//edit: tough refreshing the update page started to update process and did not return a error anymore. Maybe it showed a error the first time because i cleard the advagg cache directly before rebuilding?
Comment #22
Michsk CreditAttribution: Michsk commentedI'ts starting to work. Tough my update is stuck on 25%, when i look at a node i see that some js is getting compressed. Drupal for facebook (module) js is not getting compressed.
//edit Another refresh, another header error from jsmin+ in the log, but now it's stuck at 68%
Comment #23
Michsk CreditAttribution: Michsk commentedAlso rebuilding aggegrated files returns the headers error
Comment #24
Michsk CreditAttribution: Michsk commentedOk everything is getting compressed except the drupal for facebook code. I'll create a new issue.
Comment #25
mikeytown2 CreditAttribution: mikeytown2 commentedpointing this thread to #1303034: Compress Drupal For Facebook JS