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)

#2 filefield_extension_check_fix.patch1.22 KBquicksketch
Members fund testing for the Drupal project. Drupal Association Learn more


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
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.