After uploading a File to a theme-settings field:
admin/appearance/settings/%theme
With a Field Something Like this:
$form['background'] = array(
'#type' => 'managed_file',
'#title' => t('Background Image'),
'#default_value' => theme_get_setting('background'),
);
If Files undo remove is enabled, uploading a File to a managed_file field that is a standard field and not attached to an entity, will result in this Error:
Notice: Undefined index: #field_name in files_undo_remove_file_process() (line 41 of modules/files_undo_remove/files_undo_remove.module).
thanks!
david
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | notice-1889628-1.patch | 560 bytes | davidwbarratt |
Comments
Comment #1
davidwbarratt commentedPlease test the attached patch which fixes the problem.
If the module is used on a settings form, it's the same scenario as a field with a cardinality of 1. In the existing case, the function returns the element, which should be the same result in this scenario.
thanks!
Comment #2
swentel commentedLooks good indeed, pushed and committed, thanks!
Comment #3
davidwbarratt commentedwow!
Thanks for being an awesome maintainer!