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?

Tag1 supports the Drupal Project.Tag1 logo

Comments

mikeytown2’s picture

Status: Active » Needs review
FileSize
1.36 KB

committed this patch, change to fixed if this solves this issue.
snapshot:
http://drupalcode.org/project/advagg.git/snapshot/2ca4cbe52161ea79d69b60...

mladenu’s picture

Nope Mike. that didn`t solve the issue.. :( same error...

mikeytown2’s picture

Status: Needs review » Active
mladenu’s picture

Mike release from 29th messed up my site... Neither css or js works, and while update advagg, update.php broked with memory error message...

mikeytown2’s picture

lovely... what was the memory error?

mladenu’s picture

Fatal error: Allowed memory size of X bytes exhausted...

mikeytown2’s picture

line number, anything?

mikeytown2’s picture

memory 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.

mladenu’s picture

Ok 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...

mikeytown2’s picture

in advagg_enable I register a shutdown function advagg_flush_caches inside of that I call advagg_get_root_files_dir which executes this code

    $css_path = file_create_path('advagg_css');
    $js_path = file_create_path('advagg_js');

Question: Are you using private downloads?

mladenu’s picture

No 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...

mikeytown2’s picture

advagg_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

mladenu’s picture

Patch applied, but no luck... dirs not created... :(

mikeytown2’s picture

what does the status report say? What does watchdog say?

mladenu’s picture

Status 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...

mikeytown2’s picture

Committed this patch; adds in directory checks to the status report.

mladenu’s picture

folders created, but no files in them.. everything still mess up...

mikeytown2’s picture

CSS & JS or just JS? Try with CSS & JS compress off if they are on.

mladenu’s picture

Both... I forgot to mention that I worked with and without CSS $ JS compress on..

mladenu’s picture

latest working release of advagg is from 27th if i remember good, that worked fine, but with error when cache rebuild...

mikeytown2’s picture

Just to let you know it's working great on my end so this isn't easy to debug.

mikeytown2’s picture

looking 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.

mladenu’s picture

FileSize
103.32 KB

Here 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...

mikeytown2’s picture

mladenu’s picture

That worked, but wait to check compressions on!
Compression worked, BUT again error on views edit page...
...

mikeytown2’s picture

Back 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.

mladenu’s picture

FileSize
4.65 KB
560.95 KB

Here you go:

mikeytown2’s picture

I 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

mladenu’s picture

FileSize
86.6 KB

Sorry to not understand you, this morning I fell asleep over the computer... :)

mladenu’s picture

Mike, are you get this files? :)

mikeytown2’s picture

got them, odds are I will not be able to analyze them until tomorrow.

mladenu’s picture

Ok Mike, i will waiting for you and i`m sure you can solve this issue..

mladenu’s picture

Also, 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?

mikeytown2’s picture

200 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.

mladenu’s picture

I clearing cache every time when i do master reset... And no 302 in first load page....

mladenu’s picture

FileSize
33.62 KB

Just noticed that cache rebuild stacked with 500s between this two .js files...

mikeytown2’s picture

On 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.

SELECT filename
FROM advagg_bundles
INNER JOIN advagg_files USING ( filename_md5 )
WHERE bundle_md5 = ''
ORDER BY porder ASC

Or in php code

$md5 = '';
$result = db_query("
SELECT filename
FROM {advagg_bundles} AS ab
INNER JOIN {advagg_files} AS af USING ( filename_md5 )
WHERE bundle_md5 = '%s'
ORDER BY porder ASC
", $md5);

while ($filename = db_result($result)) {
  echo $filename . "<br>\n";
}
mladenu’s picture

I 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

mikeytown2’s picture

Status: Active » Fixed
FileSize
3.21 KB

I placed the following files in a test dir and ran this code from the webroot.

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

ini_set('memory_limit', '64M');

$files = array(
  'sr_c693d40c44f8cf9427a44c8d08a3edba.js',
  'lightbox.js',
  'poormanscron.js',
  'soundmanager2-nodebug-jsmin.js',
  'soundmanager2_config.js',
  'jquery.cycle.all.min.js',
  'views_slideshow.js',
  'views_slideshow(from thumbnailhover).js',
);

foreach ($files as $key => $filename) {
  $files[$key] = 'test/' . $filename;
}

$contents = advagg_build_js_bundle($files);

advagg_js_compress_advagg_js_alter($contents, $files, $bundle_md5);

echo $contents;

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...

mikeytown2’s picture

patch for status report; has been committed

mladenu’s picture

Can`t apply patch because of absent "function advagg_js_compress_prep_jsminplus" in advagg_js_compress.module
I will try snapshot...

mladenu’s picture

Now, 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..

mikeytown2’s picture

soundmanager2-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.

mladenu’s picture

I 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?

mladenu’s picture

FileSize
152.57 KB

But, 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..

mikeytown2’s picture

Status: Fixed » Active
mikeytown2’s picture

So, whats the issue with the 2 different files?

mladenu’s picture

So 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...

mikeytown2’s picture

js_ddbefa2d413049fd60ce83b51487d8f2_0.js
js_f13d5cd979e35dc56e48c77f1f92218d_0.js
are different file names; thus different MD5s. ddb has collapse.js included in it; f13 does not.

mladenu’s picture

That`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...

mikeytown2’s picture

#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?

mladenu’s picture

Ok, 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...

mikeytown2’s picture

Status: Active » Fixed

marking this as fixed; will use this thread to tackle more of the jsminplus issues #1116086: jsminplus.inc using excessive amounts of ram

Status: Fixed » Closed (fixed)

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