Closed (fixed)
Project:
ImageField Zip/HTML5 Bulk Upload
Version:
6.x-1.0-beta2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2011 at 08:50 UTC
Updated:
10 Apr 2013 at 18:06 UTC
Hi to all,
I'm testinfg this module... in conjunction with Transliteration on a fresh test site.
The module seems work but this error appear at the end of Upload process (when all images are displayed and before saving the node)
This is the message:
warning: implode() [function.implode]: Invalid arguments passed in /var/wwwroot/mysite/sites/all/modules/filefield/filefield_widget.inc on line 189.
Some ideas about?
Comments
Comment #1
Jean Gionet commentedI'm getting the exact same error! Any solutions for this? thxs
Comment #2
yan commentedSame error with
Drupal core 6.20
ImageField 6.x-3.9
ImageField zip support 6.x-1.0-beta2
PHP 5.2.6-1+lenny9
jQuery UI 1.7.3
jQuery Update 1.3.2
Comment #3
Dret commentedI moved to this module http://drupal.org/project/jifupload : has no support for .zip but works perfectly!
Comment #4
tuoermin commentedSame problem. For each picture in ZIP file I get the following warnings:
Comment #5
Renee S commentedAre y'all running PHP5.3? This looks like one of *those* errors. I'll try changing the function call to:
call_user_func_array($function, &$args);(passing args by reference) and report back :)UPDATE: No, this doesn't fix it...
OK, this looks like there's a problem in the overridden file_save_upload function. Some of the functions used for validation take arguments differently than they're being passed. Taking a look.
Comment #6
Renee S commentedOk, most of the errors can be fixed by adding
$args[0] = &$file;above
$errors = array_merge($errors, call_user_func_array($function, $args));on line 179. This is actually a fix added to filefield already.
However, it appears that a secret not-well-documented form element isn't being set, which leads to the implode errors.
The line in filefield_widget that's still giving an error is
$upload_name = implode('_', $element['#array_parents']);Does anybody with FAPI experience know where this should be set, or why it isn't being set?Comment #7
tfranz commentedI've the same problem – any solution on this?
Couldn't find the lines above ...
ImageField Zip Extract 6.x-1.0-beta2
FileField 6.x-3.10
Comment #8
richH commentedHi,
also got the same thing :-(
I've tried replacing the implode() function call in filefield_widget.inc at line 180ish, with a foreach as shown
but I get a foreach error because $element['#array_parents'] is NULL. If I prefix this code with a check for null arrays as shown:
then this works for one image and then stops - but without errors.
Unfortunately I don't know where $element is being created or what it contains. Actually I don't even really know how to do a var_dump() which is making this debug quite hard ;-)
I added in a bunch of things to get some output as shown below:
and get this output:
If I remove all the form_error output I still only get one single file uploaded just incase this call terminates the process. Am a bit of a newbie with drupal coding and haven't read the manual yet!!
Cheers
Rich
Comment #9
mikeytown2 commentedThis issue has been fixed in the latest dev. see #1281916: Emulate CCK/Filefield better for the diff.
Comment #11
barteque commentedif #9 working?
I'm looking at the diffs and can't find those lines in my module files
Comment #12
mikeytown2 commented@barteque
see #1281916-6: Emulate CCK/Filefield better