There are two usability errors in image.inc's reporting of errors:
1) When the GD toolkit is not present, the error "Unable to load the GD toolkit" appears on admin - settings. This error is not linked to any form control on that page, and there is no clue whatsoever as to a) what it means b) how to get rid of it.
2) When image_toolkit_invoke fails, it uses drupal_set_message to say "%method is not supported by %toolkit". This message is again ambiguous ("crop not supported by GD" doesn't tell you much) but even worse, this is being displayed to the end-user who was probably just using a module.
I suggest that in both cases we log the error to watchdog instead, with type "php" (we already use this for reporting lack of iconv support when it is needed) and severity "warning" and "error" respectively. In the second case, we should display a more friendly error to the user as well ("Due to a server misconfiguration, your image could not be processed." or something).
Comments
Comment #1
walkah commentedmaking sure i don't forget this one.
Comment #2
dopry commentedwalkah you still on this?
Comment #3
magico commented1) at ?q=admin/settings/image-toolkit the function will not return the same error. Can someone test this when PHP does not have GD bundled?
2) it seems according to this http://api.drupal.org/api/HEAD/function/image_toolkit_invoke that the refered message will not show.
I agree that these kind of errors should not be shown in the page, and it seems that the HEAD code is correct. I could not test this because of point 1.
Comment #4
ricabrantes commentedThis bug are fixed in D5.x-dev
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.