Download & Extend

The selected file /tmp/filetRzQRu could not be uploaded, because the destination sites/default/filesmin.js is not properly ...

Project:Javascript Aggregator
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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 <

AttachmentSize
patch_cope_with_empty_scripts_variables.patch.txt1.02 KB

Comments

#1

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

AttachmentSize
patch_cope_with_empty_scripts_variables.patch.txt 828 bytes

#2

Works for me 6.12.

#3

Status:active» reviewed & tested by the community

Also works for me. +1

#4

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

#5

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

#6

Status:reviewed & tested by the community» fixed

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

New version 6.x-1.3 released.

#7

Nice! Talk about a quick release :-)

#8

Status:fixed» closed (fixed)

;)