The 'image toolkits' feature is a great idea and seems wee designed - with this one exception. If GD is broken for whatever reason, and you try to select another toolkit, the fact that GD is broken will cause a form error to be set and your selection of the other toolkit will not be saved.

The following two lines in system.module are the root of the error:

  $form['image_toolkit_settings'] = image_toolkit_invoke('settings');
  return system_settings_form($form);

If GD is broken/missing, image_toolkit_invoke('settings') will always set a form error no matter which toolkit you've actually selected (presumably because it doesn't know which toolkit you've selected) and system_settings_form() will always fail because of this.

Ben

Comments

benwei’s picture

After looking through the code a little more, I think the best way to solve this might be to pass a parameter along with the call to the image_toolkit_invoke('settings') call specifying the image toolkit to generate the settings form for.

Right now image_toolkit_invoke() will always call image_gd_settings() if called with the 'settings' method, it seems like it should be calling image_TOOLKITNAME_settings() instead, if such a function exists.

dpearcefl’s picture

Status: Active » Closed (won't fix)

Due to the age of the last comment on this issue and due to the fact that D5 is no longer supported, I am closing this issue.