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.
I'm starting to see "Call to undefined function imagefield_widget_upload_validators()" - has that function been depreciated in the newest imagefield version?
Comment | File | Size | Author |
---|---|---|---|
#4 | imagefield_widget_upload_validators.patch | 2.24 KB | quicksketch |
Comments
Comment #1
drewish CreditAttribution: drewish commentedhumm... if so that's kind of a shame because the two widgets need very different upload validators...
Comment #2
quicksketchYes, the function was removed but all the validations are still in place. imagefield_widget_upload_validators() added more validators to existing validators. Now the validators are all added individually imagefield_widget(), because ImageField needs to modify an existing validator rather than add to it.
This was done because of #316099: Hard-coded file extensions "Must be a JPEG, PNG or GIF image", where users were getting both double error messages and helptext saying "Must be an JPEG, PNG or GIF image". Rather than using the filefield_is_image() validator, ImageField now modifies the allowed extension list to only allow web images, accomplishing the same thing.
Comment #3
quicksketchComment #4
quicksketchI've added back in this function, since apparently other contrib modules were using it (notably Image fupload). It wasn't truly necessary to remove the function, since we can rebuild the "filefield_validate_extensions" validator from the $field parameter. This patch restores this function and maintains the same behavior.
Comment #5
quicksketchThis issue helped explain to me why keeping this function is important #292904: Mass import/upload?.
Comment #6
grandcat CreditAttribution: grandcat commentedThank you for having added this function again, this helps a lot concerning mass upload.
@ quicksketch:
Additionally, thank you very much for your patch provided for image fupload. It really helps a lot, I will do the rest concerning saving some extra values.
Comment #8
lukusHi - I've just encountered this error while making use of the imagefield_import module (http://drupal.org/project/imagefield_import).
Is there a possibility that the patch will be committed to the release version?