I think I solved the problem that emmits a warning like : "The selected file /tmp/filetRzQRu could not be uploaded, because the destination sites/default/filesmin.js is not properly configured."
It was because the
preg_match_all($pattern, $scripts, $matches);
on line 86-87 (stable ot CVS version release )
when run on a whitespace $scripts variable returns an empty value in $matches[2][0]...
On my brand new site with javascript_aggregator 1.2
i saw that the function _javascript_aggregator_minify($scripts) {
func was called 2 times - once with the main drupal $scripts and secondly with the $js_footer scripts... The second one for some reason was equal to " " - single space or similar... whitespace for sure.
So now in the module $js_footer is being cheked for being empty - and the preg_match_all does not check if it gets sth or nothing ....
The simple solution attached - an if added to the preg_match....
Code not indented on purpose beneath that "if" I add - for simplicity of the patch and cause if you indent it you must correct the <
Patch will work on 1.2 and CVS.
Cheers.
PS This issue if I am correct above should fix those:
- #263557: Unable to aggregate
- #479008: Error saving aggregated files
and maybe others.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | patch_cope_with_empty_scripts_variables.patch.txt | 828 bytes | rsvelko |
| patch_cope_with_empty_scripts_variables.patch.txt | 1.02 KB | rsvelko |
Comments
Comment #1
rsvelko commentedrerolled against CVS version and stripped the dirs in the diff path - now is one .module file only
Comment #2
jamestombs commentedWorks for me 6.12.
Comment #3
kmontyAlso works for me. +1
Comment #4
benkewell commentedcould a new version be released to include this patch?
though it seems not breaking my website, the error message is pretty annoying
Comment #5
geerlingguy commentedConfirming that this patch works (again). Please roll it into a release at some point :-)
Comment #6
derjochenmeyer commentedcommitted: http://drupal.org/cvs?commit=241454
New version 6.x-1.3 released.
Comment #7
geerlingguy commentedNice! Talk about a quick release :-)
Comment #8
derjochenmeyer commented;)