[SOLVED][Drupal Multiupload Filefield Widget] Notice: Undefined index: #size in file_managed_file_process() (line 446 of .../file.module)

| | 1 min read

Many Drupal users got a Notice: Undefined index: #size in file_managed_file_process() (line 446 of .../file.module) error while trying to create/edit a node using the Drupal Multiupload Filefield Widget module. Their files seemed to be uploading correctly but were accompanied by two error messages. If you are getting the same error message under when using the Drupal Multiupload Filefield Widget module then continue reading for the solution.

Here is the solution.

  • Update the multiupload_filefield_widget.module file with the following code.
     30,
    
    
    44:  function mfw_managed_file_process($element, &$form_state, &$form) {
    +  $element['#size']=30; //just element width =)
    ?>
  • Remember to create a patch when you edit the module
  • Some Drupal 7.14 users reported success with the following code
 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']) . '[]';

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. Do you need professional help in building your Drupal site? We can provide a wide range of Drupal services to help you deploy your Drupal site easily and quickly. Get in touch with us to know more.