When the list of Permitted upload file extensions: is changed to allow bmp, or tiff, the module throws an error, and oddly adds additional commas between all of the existing file extensions.

To reproduce:
1) configure an image field
2) attempt to add tiff to the list
3) note error, then note list (now says png,, gif,, jpg,, jpeg,, tiff)
4) delete tiff, replace with bmp, try to save again
5) note error, the note list (now says png,,, gif,,, jpg,,, jpeg,,, bmp)

CommentFileSizeAuthor
#2 filefield_extension_check_fix.patch1.22 KBquicksketch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Project: ImageField » FileField

Thanks, moving this over to FileField, since it's responsible for the extension list field.

quicksketch’s picture

Status: Active » Fixed
FileSize
1.22 KB

I've committed this fix which prevents the extra commas from showing up. It also allows preceding dots before file extensions but automatically strips those out upon saving. This should help a lot and follow the practice of "accept values loosely, store them consistently".

Status: Fixed » Closed (fixed)

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