This is most easily reproduced installing flexifield, creating a content type containing only a file (say "file") and a type containing a flexifield referencing the first type (say "fileset"). Whenever saving a form, the subsequent files or images are overwritten by the first one.

This is because the rendered html field (<input type="file" ...>) does not respect the #array_parents in its naming. The supplied patch fixes this.

filefield.patch938 bytesdrm1114
Members fund testing for the Drupal project. Drupal Association Learn more


quicksketch’s picture

Status: Patch (to be ported) » Needs review

Thanks this looks good. I'll give it a shot when I get a chance.

quicksketch’s picture

Title: The filefield_save_upload has a naming collision with nested types containing the same field name » Can not re-use the same field multiple times in the same content type (i.e with Flexifield)
Priority: Normal » Minor
Status: Needs review » Fixed

Tested this out and it works great. Demoting to minor since Flexifield is about the only way this situation could occur.

Status: Fixed » Closed (fixed)
Issue tags: -name array_parents filefield_save_upload

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