Download & Extend

Can not re-use the same field multiple times in the same content type (i.e with Flexifield)

Project:FileField
Version:6.x-3.7
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (fixed)
Issue tags:name array_parents filefield_save_upload

Issue Summary

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.

AttachmentSize
filefield.patch938 bytes

Comments

#1

Status:patch (to be ported)» needs review

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

#2

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.

#3

Status:fixed» closed (fixed)

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

nobody click here