I'm starting to see "Call to undefined function imagefield_widget_upload_validators()" - has that function been depreciated in the newest imagefield version?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewish’s picture

humm... if so that's kind of a shame because the two widgets need very different upload validators...

quicksketch’s picture

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

quicksketch’s picture

Category: bug » support
Status: Active » Fixed
quicksketch’s picture

Title: imagefield_widget_upload_validators removed from most recent beta? » Restore imagefield_widget_upload_validators
Category: support » task
FileSize
2.24 KB

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

quicksketch’s picture

This issue helped explain to me why keeping this function is important #292904: Mass import/upload?.

grandcat’s picture

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

Status: Fixed » Closed (fixed)

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

lukus’s picture

Hi - 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?