Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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)
Comment | File | Size | Author |
---|---|---|---|
#2 | filefield_extension_check_fix.patch | 1.22 KB | quicksketch |
Comments
Comment #1
quicksketchThanks, moving this over to FileField, since it's responsible for the extension list field.
Comment #2
quicksketchI'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".