If 'Number of values' for field instance is set to 1, after upload of file following warnings are displayed:
Notice: Undefined index: #file_upload_delta in theme_extended_file_field_widget_multiple() (line 1275 of /var/www/drupal7/sites/all/modules/extended_file_field/extended_file_field.module).
Notice: Undefined index: #file_upload_title in theme_extended_file_field_widget_multiple() (line 1291 of /var/www/drupal7/sites/all/modules/extended_file_field/extended_file_field.module).
Notice: Undefined index: #file_upload_description in theme_extended_file_field_widget_multiple() (line 1292 of /var/www/drupal7/sites/all/modules/extended_file_field/extended_file_field.module).
Comments
Comment #1
MilosL CreditAttribution: MilosL commentedComment #2
jthorson CreditAttribution: jthorson commentedThanks for the report.
To be honest, cardinality = 1 wasn't even considered during the development of this module ... so I'm not surprised that it's throwing notices.
For the moment, I've committed a quick cardinality check to the hook_widget_file_generic_form_alter() function, so that we no longer attempt to apply multi-field widget theming to single-value fields. This should at least get rid of the notices on the edit page.
I haven't done a closer look to see if all of the logic on the field_formatter side is okay with single-value fields, so going to leave this open for now ... it appears to be looking okay based on my test site, but I'd like to take a closer look once life settles down a bit.
For now, the latest -dev version should solve the php notice issues.
Comment #3
jthorson CreditAttribution: jthorson commented