The Webform Multiple File module currently truncates the $submission->file_usage['renameable'] part of the submission form object.

An array dump should have something like [file_usage] => Array ( [deleted_fids] => Array ( ) [added_fids] => Array ( [0] => 319 [1] => 320 ) [renameable] => Array ( [28] => Array ( [0] => 319 [1] => 320) ) but instead simply has deleted_fids and added_fids.

Webform looks for 'renameable' in webform_file_rename() (see line 582, webform/components/file.inc).

Comments

liquid06’s picture

Project: Webform Multiple File Upload » Webform Multiple File
Version: 7.x-1.3 » 7.x-1.x-dev
Jeff Turman’s picture

Status: Active » Needs review
StatusFileSize
new982 bytes

This patch let's the 'renameable' value in file_usage to remain in the array, therefore not throwing any unsightly warnings or truncating already-existing submission data. This doesn't add tokenization support for webform_multiple_file, which should be a goal for a future release of the module, since filename-tokenization is now possible in webform.

raj45’s picture

I can confirm that the patch works just fine, thanks Jeff!

workplaysleep’s picture

THe patch also worked for me, thnx!

kaypro4’s picture

The patch in #2 resolved the error for me as well. Thanks Jeff.

kaypro4’s picture

Status: Needs review » Reviewed & tested by the community

  • Chalk committed e8b43b0 on 7.x-1.x
    Issue #2485213 by Chalk: Webform Multiple File throws notice and warning...
chalk’s picture

Status: Reviewed & tested by the community » Closed (fixed)