Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.With same settings (all below options is on):
Enable Advanced Aggregation
Use AdvAgg in closure
Generate CSS/JS files on request (async mode)
Gzip CSS/JS files...
and after master reset one .js file created in advagg_js folder on admin/settings/advagg page.. That file is on archive with prefix "withoutJScompression".. After master reset when i go to cache rebuild advagg bring me a same file but more compressed... Mike, i put those files for you to see reason for that.. I noticed only that the beatytips js not compressed in first .js file, but what happened to him in second .js file?
| Comment | File | Size | Author |
|---|---|---|---|
| #45 | JS_files.zip | 152.57 KB | mladenu |
| #44 | js_ddbefa2d413049fd60ce83b51487d8f2_0.js_.zip | 76.53 KB | mladenu |
| #40 | advagg-jsminplus-mem-1107010-40-D6.patch | 1.2 KB | mikeytown2 |
| #39 | advagg-jsminplus-1107010-39-D6.patch | 3.21 KB | mikeytown2 |
| #36 | Js_files.zip | 33.62 KB | mladenu |











Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted this patch, change to fixed if this solves this issue.
snapshot:
http://drupalcode.org/project/advagg.git/snapshot/2ca4cbe52161ea79d69b60...
Comment #2
mladenu CreditAttribution: mladenu commentedNope Mike. that didn`t solve the issue.. :( same error...
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedComment #4
mladenu CreditAttribution: mladenu commentedMike release from 29th messed up my site... Neither css or js works, and while update advagg, update.php broked with memory error message...
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedlovely... what was the memory error?
Comment #6
mladenu CreditAttribution: mladenu commentedFatal error: Allowed memory size of X bytes exhausted...Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedline number, anything?
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedmemory errors means jsmin+ bombed on that file
#940342: Javascript Aggregator: Allowed memory size ... exhausted
If you where to upload a zip of all your JS files on your site with an index showing where they are (full path) that would help me debug the issues your having. Also having a ?advagg-debug=1 on one of your problematic pages would be helpful as well.
Comment #9
mladenu CreditAttribution: mladenu commentedOk Mike, i will do that for you shortly...
I can not remember what exactly was said on update.php memory break, because i reload page at that moment...
I was installed cleanly latest dev of advagg and because of non fuctional css and js i notice that neither advagg_css or advagg_js not created on /sites/default/files/ dir..
But, i can not activate advagg at all, because of mentioned non created dirs...
Comment #10
mikeytown2 CreditAttribution: mikeytown2 commentedin advagg_enable I register a shutdown function advagg_flush_caches inside of that I call advagg_get_root_files_dir which executes this code
Question: Are you using private downloads?
Comment #11
mladenu CreditAttribution: mladenu commentedNo Mike, i do not use private downloads... I understand what you did, but something prevents cache dirs to becreated, and that something did not permissions...
Comment #12
mikeytown2 CreditAttribution: mikeytown2 commentedadvagg_css_js_file_builder issues a file_check_directory() call so that dir should be created on demand. Anyway I now create those dirs on install as well. Patch below has been committed
Comment #13
mladenu CreditAttribution: mladenu commentedPatch applied, but no luck... dirs not created... :(
Comment #14
mikeytown2 CreditAttribution: mikeytown2 commentedwhat does the status report say? What does watchdog say?
Comment #15
mladenu CreditAttribution: mladenu commentedStatus report says error free, but message from watchdog is "This request could not generate correctly. Loop detected. Request data: %info" and variables are
a:1:{s:5:"%info";s:70:"sites/default/files/advagg_js/js_ca8fb8d3ad4ebae9deaa3232770b2ca4_0.js";}from home page...Comment #16
mikeytown2 CreditAttribution: mikeytown2 commentedCommitted this patch; adds in directory checks to the status report.
Comment #17
mladenu CreditAttribution: mladenu commentedfolders created, but no files in them.. everything still mess up...
Comment #18
mikeytown2 CreditAttribution: mikeytown2 commentedCSS & JS or just JS? Try with CSS & JS compress off if they are on.
Comment #19
mladenu CreditAttribution: mladenu commentedBoth... I forgot to mention that I worked with and without CSS $ JS compress on..
Comment #20
mladenu CreditAttribution: mladenu commentedlatest working release of advagg is from 27th if i remember good, that worked fine, but with error when cache rebuild...
Comment #21
mikeytown2 CreditAttribution: mikeytown2 commentedJust to let you know it's working great on my end so this isn't easy to debug.
Comment #22
mikeytown2 CreditAttribution: mikeytown2 commentedlooking at the code the issue is with cache_advagg_file_builder... trying to find a way to get this to work as this cache cut the time from 100ms down to 30ms on my box.
Comment #23
mladenu CreditAttribution: mladenu commentedHere is the latest version worked for me... I believe you, but believe to me that the problem started to bother me when i update to version from 29th.. I am sorry that no more of them who have been trying this module as I...
when I get back to this version everything works other than those mentioned 500s errors while cache rebuild...
Comment #24
mikeytown2 CreditAttribution: mikeytown2 commentedtry this patch; should do the job.
Snapshot: http://drupalcode.org/project/advagg.git/snapshot/62f00f1af74cae6f02ed43...
Comment #25
mladenu CreditAttribution: mladenu commentedThat worked, but wait to check compressions on!
Compression worked, BUT again error on views edit page...
...
Comment #26
mikeytown2 CreditAttribution: mikeytown2 commentedBack to the original issue :)
Can I get a zip of all JS files included on your views edit page? Find out via advagg-debug=1, be sure to also include the debug output somewhere.
Comment #27
mladenu CreditAttribution: mladenu commentedHere you go:
Comment #28
mikeytown2 CreditAttribution: mikeytown2 commentedI need the source files not the result; going to test each one. I'm guessing there is an edge case where jsmin+ blows up when the end of one is added on to the start of another.
Files needed:
sites/default/files/languages/sr_c693d40c44f8cf9427a44c8d08a3edba.js
sites/all/modules/lightbox2/js/lightbox.js
sites/all/modules/poormanscron/poormanscron.js
sites/all/libraries/soundmanager2/script/soundmanager2-nodebug-jsmin.js
sites/all/modules/soundmanager2/soundmanager2_config.js
sites/all/modules/views_slideshow/js/jquery.cycle.all.min.js
sites/all/modules/views_slideshow/contrib/views_slideshow_singleframe/views_slideshow.js
sites/all/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/views_slideshow.js
sites/all/modules/admin_menu/admin_menu.js
sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.js
sites/all/modules/views/js/base.js
sites/all/modules/views/js/tabs.js
sites/all/modules/views/js/ajax.js
sites/all/modules/calendar/js/calendar_colorpicker.js
sites/all/modules/views/js/dependent.js
sites/all/modules/beautytips/js/jquery.bt.min.js
sites/all/modules/beautytips/js/beautytips.js
sites/all/themes/alphorn/js/jquery.cycle.all.js
sites/all/themes/alphorn/js/supersleight.plugin.js
sites/all/themes/alphorn/js/custom.js
sites/all/themes/alphorn/menu/stmenu/stmenu.js
Comment #29
mladenu CreditAttribution: mladenu commentedSorry to not understand you, this morning I fell asleep over the computer... :)
Comment #30
mladenu CreditAttribution: mladenu commentedMike, are you get this files? :)
Comment #31
mikeytown2 CreditAttribution: mikeytown2 commentedgot them, odds are I will not be able to analyze them until tomorrow.
Comment #32
mladenu CreditAttribution: mladenu commentedOk Mike, i will waiting for you and i`m sure you can solve this issue..
Comment #33
mladenu CreditAttribution: mladenu commentedAlso, i noticed that in headers i got 200s code for css file that not exist in sites/default/files/advagg_css/ dir... How is that possible?
Comment #34
mikeytown2 CreditAttribution: mikeytown2 commented200 Could be from the browser cache; it's a pretty aggressive setting on that cache. Was there a 302 redirect in there, if yes then it pointed you to the correct file even though the counter was off.
Comment #35
mladenu CreditAttribution: mladenu commentedI clearing cache every time when i do master reset... And no 302 in first load page....
Comment #36
mladenu CreditAttribution: mladenu commentedJust noticed that cache rebuild stacked with 500s between this two .js files...
Comment #37
mikeytown2 CreditAttribution: mikeytown2 commentedOn the file that it 500-ed, get the md5 value of it.
js_{MD5}_0.js
With that md5 value plug it into this db query and run it.
Or in php code
Comment #38
mladenu CreditAttribution: mladenu commentedI got this:
sites/default/files/languages/sr_c693d40c44f8cf9427a44c8d08a3edba.js
sites/all/modules/lightbox2/js/lightbox.js
sites/all/modules/poormanscron/poormanscron.js
sites/all/libraries/soundmanager2/script/soundmanager2-nodebug-jsmin.js
sites/all/modules/soundmanager2/soundmanager2_config.js
sites/all/modules/views_slideshow/js/jquery.cycle.all.min.js
sites/all/modules/views_slideshow/contrib/views_slideshow_singleframe/views_slideshow.js
sites/all/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/views_slideshow.js
Comment #39
mikeytown2 CreditAttribution: mikeytown2 commentedI placed the following files in a test dir and ran this code from the webroot.
Was able to see that the 2 min.js files where still trying to be minified due to some bugs in the code. Patch below has been committed and should fix this issue! On a side note I need to make a requirement that this module needs 96MB of ram to run; similar to GD image library.
Snapshot: http://drupalcode.org/project/advagg.git/snapshot/9b87d5adcbc447ffc33823...
Comment #40
mikeytown2 CreditAttribution: mikeytown2 commentedpatch for status report; has been committed
Comment #41
mladenu CreditAttribution: mladenu commentedCan`t apply patch because of absent "function advagg_js_compress_prep_jsminplus" in advagg_js_compress.module
I will try snapshot...
Comment #42
mladenu CreditAttribution: mladenu commentedNow, it seems to be ok :), but i do not understand why in this js file problematic js scripts is not minified at all... Mike, please look in this file... Sound manager, beatytips are not minified.. Is that how as should be..
Comment #43
mikeytown2 CreditAttribution: mikeytown2 commentedsoundmanager2-nodebug-jsmin.js
jquery.cycle.all.min.js
Caused jsmin+ to blow up. I tried each one individually and if either one was in, JSmin+ used LOTS of memory. As to why I have no idea; Looking at the JS files they do not appear to be minified.
http://crisp.tweakblogs.net/blog/cat/716 is the source for jsmin+
If your wondering, jsmin has GPL issues and it broke my JS so I won't use the php version of it. BUT I did just add support for php_jsmin... problem is I can't get it to work on my server. #1109978: Add support for php_jsmin extension If a function called jsmin() exists then you can select to use that from the admin/settings/advagg/js-compress page.
As for Google Closure Compiler: #1113798: Offering to maintain Google Closure Compiler I'm waiting.
Comment #44
mladenu CreditAttribution: mladenu commentedI was so sleepy this morning, I forgot to upload file! :D
I understand the problem, so now wondering if it would help to find non-minified version of problematic files and put them in proper place?
Comment #45
mladenu CreditAttribution: mladenu commentedBut, but, but... while you solve one issue, another appear again... :) After master reset and cache rebuild, again, got this 2, for me, almost same files..
Comment #46
mikeytown2 CreditAttribution: mikeytown2 commentedComment #47
mikeytown2 CreditAttribution: mikeytown2 commentedSo, whats the issue with the 2 different files?
Comment #48
mladenu CreditAttribution: mladenu commentedSo in the last 2 uploaded .js files you will notice no difference but different md5, and are generated at the same time, so I wonder how this happened? Looks like to me that is the problem we have already solve...
Comment #49
mikeytown2 CreditAttribution: mikeytown2 commentedjs_ddbefa2d413049fd60ce83b51487d8f2_0.js
js_f13d5cd979e35dc56e48c77f1f92218d_0.js
are different file names; thus different MD5s. ddb has collapse.js included in it; f13 does not.
Comment #50
mladenu CreditAttribution: mladenu commentedThat`s clear, but why those files created at same time on same page? And why soundmanager2-nodebug-jsmin.js & jquery.cycle.all.min.js remain normal in .js, not minified? Sorry if i bother you...
Comment #51
mikeytown2 CreditAttribution: mikeytown2 commented#43 explains why soundmanager2-nodebug-jsmin.js & jquery.cycle.all.min.js is not minified; JSMin+ blows up on it. My guess is there is a small section of code in each of those files that is minified and thus causes issues with JSMin+. I will not fix that library. I did let the author know about the findings here http://crisp.tweakblogs.net/blog/1856/jsmin+-version-13.html#r_85485
Are you sure they where created at the same time? Where they both referenced in the same html?
Comment #52
mladenu CreditAttribution: mladenu commentedOk, Mike... I will try with different version of that files...
I`m absolutely sure that they created at same time in the same html.
By the way, previous version of advagg which shows 500s do compression on mentioned js_ddbefa2d413049fd60ce83b51487d8f2_0.js which contains soundmanager and decrease file size about 50K on first time cache rebuild... Please compare #44with same file on very first post by me...
Comment #53
mikeytown2 CreditAttribution: mikeytown2 commentedmarking this as fixed; will use this thread to tackle more of the jsminplus issues #1116086: jsminplus.inc using excessive amounts of ram