When I try to create new node or edit existing node using Multiupload Filefield Widget, i get following error:

Notice: Undefined index: #size in file_managed_file_process() (line 446 of /home/milhaus/.www/drupal_blank/drupal-dev/modules/file/file.module).

The files are uploading, but for each upload, there are two same errors.

I am using last dev version and would love to report more details, if needed.

You might be also interested in my PHP Info: http://knihovna.litomysl.cz/utils/phpinfo.php

Comments

czigor’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

Can you reproduce this on a clean install? What are the steps to reproduce this?

divined’s picture

multiupload_filefield_widget.module

44:  function mfw_managed_file_process($element, &$form_state, &$form) {
+  $element['#size']=30; //just element width =)
dgastudio’s picture

same problem. proposed solution in #2 works.

marcel.jtf’s picture

#2 did not entirely work for me. I also had to change the array definition

30:
+     '#size' => 30,
daniela basualdo’s picture

Version: 7.x-1.x-dev » 7.x-1.0
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new858 bytes

i added a patch for this.
I used 22 because it used to be 22 in the function file_managed_file_process() of modules/file/file.module.

czigor’s picture

Status: Needs review » Fixed
StatusFileSize
new538 bytes

That's my go at it.

Idefix’s picture

Status: Fixed » Needs review

Hi all,

I've installed the new drupal 7.14 with the latest version of multiupload and I received the same error. Sadly the fix is not working for me. I do not get the error anymore after I changed the *.module, but I can only upload one image at the time.

I have changed line 30 and 44 with the info given in the patches. If you need the php codes let me know.

Edit: Solution that worked for me (sorry it's an uggly one) is to replace the "/modules/filefile.module" from the 7.14 with the old "/modules/filefile.module" from 7.12. Apparently there are some changes within the new Drupal that Multiupload does not like.

Hopefully you guys can find a proper solution.

czigor’s picture

Status: Needs review » Active

For me it's working with D7.14 with both multiupload imagefield and filefield modules. The #size notice disappeared. Are you using the dev version? Does anyone else experience the problem in #7?

metalshreds’s picture

I just updated to 7.14 and the first thing I noticed was this error. I'm using module version 7.x-1.0 for the Multiupload filefield widget.

Idefix’s picture

It was on a clean install of the latest Drupal 7.14. I installed it with the Dutch language and used the modules Colorbox 7.x-1.3, Views 7.x-3.3, Multiupload Filefield Widget 7.x-1.0 and Multiupload Imagefield Widget 7.x-1.0.

Difference with TS is that I use the recommended version instead of the dev and I can only upload one file a the time. Hopefully you can now reproduce this error. At the end of the week I can make another clean install to check if I can reproduce the error. Maybe only the Dutch people are screwed ;).

czigor’s picture

Status: Active » Fixed

The fix is only in the dev version. Please reopen, if that does not work.

Idefix’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

Thank you! I reinstalled the widgets with the dev version and it works with Firefox and Chrome, but I cannot use the multiupload with Explorer. With Explorer (9.0.8112.16421) I can only select one item at the time, but anyway I'm using FF in general so it doesn't bother me.

Thanks for the nice widget and the help!

Status: Fixed » Closed (fixed)

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

cweagans’s picture

Project: » Multiupload Filefield Widget
smileeman2002’s picture

Hi I am new to add patches to Drupal. Where would I add this patch? I assume in the multiupload_filefield_widget.module file?

LiamOReilly’s picture

Hi. When will this be patch (currently in dev) be merged into the main release? I would like to not have this bug present, but do not really want to install the development version.

Thanks
Liam

aarailfan’s picture

I'm in agreement with LiamOReilly, I'd like to see this fixed in the main release as I'd rather not run the dev version on my production sites.

chichio9000’s picture

#2 worked with me.

Thanks divined

wbartussek’s picture

Category: bug » task

Worked for me; however the purpose of the size param didn't become clear to me. #2 proposed 30 as its value, #5 thinks that 22 is better because it used to be 22, if I change it to 5 there is no observable difference in behavior. So, what is it for?

danny englander’s picture

I applied the patch in #6 against dev from 2012-Jul-05 and it worked to fix the issue. Thanks.

skamble’s picture

Version: 7.x-1.x-dev » 7.x-1.0

#2 and #4 worked for me.

mittina’s picture

Issue still present in Drupal 7.15
and multiupload_filefield_widget-7.x-1.0.
Wamp 2.2. with PHP 5.3.1. and Apache 2.2.22

Solved using #2 and #4.

juves’s picture

Status: Closed (fixed) » Needs work

Another path in #1 in #1682126: Undefined index: #size

Andy Dorman’s picture

I am not sure what was intended for Multiupload Filefield Widget to do when $element['#size'] is missing/empty.

So I took the minimalist approach to take care of the error...if #size is "empty", go ahead and set it to NULL.

 function mfw_managed_file_process($element, &$form_state, &$form) {
+  if (empty($element['#size'])) $element['#size'] = NULL;
   $element = file_managed_file_process($element, $form_state, $form);
   $element['upload']['#attributes'] = array('multiple' => 'multiple');
   $element['upload']['#name'] = 'files_' . implode('_', $element['#parents']) . '[]';

This works for us with Drupal 7.14.

czigor’s picture

Status: Needs work » Fixed

See #11

Status: Fixed » Closed (fixed)

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

sardbaba’s picture

#24 worked for me

rbaprado’s picture

This issue seems to be back on the 7.16 core update. I already cleaned the caches and ran update.php, the error persists...

rbaprado’s picture

Status: Closed (fixed) » Active
rbaprado’s picture

Category: task » bug
czigor’s picture

Status: Active » Closed (fixed)

Use the dev.

goback136’s picture

#2 and #4 worked for my upgrade from drupal 7.12 to 7.19
changes @
/www/sites/all/modules/1115362/multiupload_filefield_widget.module