No mention of image toolkit

dokumori - May 19, 2009 - 13:28
Project:Imagefield Crop
Version:6.x-1.0-beta3
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Issue tags:hook_enable
Description

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 :)

#1

yhager - June 4, 2009 - 04:56
Status:active» fixed

I assumed imageapi will require these, but I've added a note to the README. Thanks!

#2

Deciphered - June 16, 2009 - 04:12
Priority:minor» normal

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

#3

yhager - June 16, 2009 - 04:39
Status:fixed» active

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

#4

dokumori - June 17, 2009 - 16:04

Actually what imageapi tells you is that no toolkit is present so adding the programmatic check is useful. Cheers!

#5

boaz_r - August 26, 2009 - 18:54
Status:active» needs review

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

AttachmentSize
BR1_patch_466948.patch 1.04 KB

#6

yhager - August 28, 2009 - 11:39
Status:needs review» needs work

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

#7

boaz_r - August 28, 2009 - 12:45

hook_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 :-)

#8

yhager - September 13, 2009 - 11:34
Status:needs work» fixed

Deciphered, 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).

#9

System Message - September 27, 2009 - 11:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.