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.

Comments

rsvelko’s picture

rerolled against CVS version and stripped the dirs in the diff path - now is one .module file only

jamestombs’s picture

Works for me 6.12.

kmonty’s picture

Status: Active » Reviewed & tested by the community

Also works for me. +1

benkewell’s picture

could a new version be released to include this patch?
though it seems not breaking my website, the error message is pretty annoying

geerlingguy’s picture

Confirming that this patch works (again). Please roll it into a release at some point :-)

derjochenmeyer’s picture

Status: Reviewed & tested by the community » Fixed

committed: http://drupal.org/cvs?commit=241454

New version 6.x-1.3 released.

geerlingguy’s picture

Nice! Talk about a quick release :-)

derjochenmeyer’s picture

Status: Fixed » Closed (fixed)

;)