Hello.
I have a simple content-type with a single Filefield. It is set to "Unlimited items". When the content is created, I have a single filefield with the "Add Another Item" button, which is just what I want (uploading a file is optional). However, when a node is edited (whether it has an uploaded file attached or not), *two* Filefields are displayed instead of one.
Why is that?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | double filefield | 70.93 KB | seeder17 |
Comments
Comment #1
decipheredIt also happens when previewing a node during the creation process (without uploading a file).
Comment #2
decipheredTested with dev version, issue is still present.
Comment #3
michael.k commentedI may be experiencing something related to your issue.
In my case the "unlimited" option creates a half-useful field in the create story page that has shows "add another item" and has to be clicked and the page refreshed/saved for the "choose file" option.
Then in a views list I see duplicate entries if there is more than one file attached to a node.
Here is my post: http://drupal.org/node/578354
Comment #4
quicksketchI've confirmed this problem, with the latest CCK and FileField. Last I checked this wasn't actually the behavior, but I think a recent change to CCK might have affected the way FileField tries to make only one field by default (while CCK will always try to make 2 empty fields for multi-value fields).
Comment #5
seeder17 commentedI checked the double appearing in the database of my drupal installation and it looks like the filefield builds empty entrys in the content_field_"image" table with just an delta value. there's a screenshot in the attachment. If I delete the enrys maualy the double filefield is gone, but it appears again in some new nodes.
Comment #6
decipheredMarking back to 6.x-3.x-dev, as it is the more recent build.
Comment #7
ircdirk commentedThis double empty fields is due to CCK setting here is patch that solves it:
http://drupal.org/node/320313
:) worked for me ;)
Comment #8
quicksketchFileField also has a temporary work around in it currently to reduce this to one field by default included in 3.2 and higher.