In order to make the cropping to actually work, this module needs to have not only imageAPI installed, but also GD2 or ImageMagick enabled. It will be helpful if users are informed about this through drupal_set_message() or README.txt at least.
Thanks a million for the great module btw :)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | BR1_patch_466948.patch | 1.04 KB | boaz_r |
Comments
Comment #1
yhager commentedI assumed imageapi will require these, but I've added a note to the README. Thanks!
Comment #2
decipheredThis is only a request, I'm happy for you to leave this issue marked as fixed and ignore the following :)
I consider my self a pretty savvy user, being a module developer and all, but I hit this issue and I didn't even consider looking at the README.txt.
It could pay to use hook_requirements() to add a message/warning/error on install that notifies users of the need to install one of the libraries.
Cheers,
Deciphered.
Comment #3
yhager commentedWell, the README file is there for a reason, and it is named by the action required, in capital letters :).
Nevertheless, I'll accept your offer, as it is never too cautious to make another check. If you can supply a patch (http://drupal.org/patch/create), I'll be happy to include it in, probably faster than I'll implement it myself.
Comment #4
dokumori commentedActually what imageapi tells you is that no toolkit is present so adding the programmatic check is useful. Cheers!
Comment #5
boaz_r commentedthere. a patch for resolving this issue:
when enabling the module, if no toolkits are alive, an error message is displayed and the module is not being enabled.
Comment #6
yhager commented@boaz_r, thanks for the patch.
Isn't hook_requirements() more appropriate in this case? It should take care of the case that the image toolkit is enabled at install time, but disabled later.
Comment #7
boaz_r commentedhook_requirements, "install" phase runs only when installing the module for the first time and possibly (haven't checked it) only if your module has hook_install() implementation. This means that if you install + enable the module, then do god's know what, then disable it. Then enabling it back some time in the future, this time with no toolkit present, with hook_requirements() you wont get any notice about this and the enabling is permitted but the imagefield_crop wont work (this bug).
On the contrary, with my design, no matter what: when enabling the module it checks for presence of at least one imageapi toolkits. None present? imagefield_crop is disabled plus an error message is shown to the administrator.
Feel free to alter my design, of course - you're own imagefield_crop :-)
Comment #8
yhager commentedDeciphered, boaz_r: I have added hook_requirements() implementation for this module. However, note that imageapi, which this module depends on, also have the same hook_requirements implementation. So this should have showed up in your status report anyway (alas without specifically mentioning imagefield_crop).