If you're using a contrib image toolkit and then change your mind and remove the .inc file without changing the setting at admin/settings/image-toolkit first, you won't be able to do it without restoring the file.

The attached patch leaves the image_toolkit setting on the form so that the admin can adjust the setting after removing the toolkit file.

Comments

drewish’s picture

Title: Cannot reset the image toolkit once the .inc file is removed » Cannot change image toolkit setting after the .inc file is removed

Quick steps for duplicating:
- install image module
- copy the image.imagemagick.inc file from the images directory to /includes
- open up admin/settings/image-toolkit and select 'image magick'
- remove the image.imagemagick.inc file
- open up admin/settings/image-toolkit, there's no longer an option and you can't reset the image_toolkit variable.

drewish’s picture

someone else ran into this over on: http://drupal.org/node/132833

drewish’s picture

i think that http://drupal.org/node/137755 and http://drupal.org/node/140401 would both be helped by this

drewish’s picture

Version: 5.x-dev » 6.x-dev
StatusFileSize
new1.49 KB

since this still affects HEAD i've rolled a patch that applies without offset

sun’s picture

I'd rather stick to

  if (count($toolkits_available) > 1 || variable_get('image_toolkit', image_get_toolkit()) != 'gd') {

because I prefer to omit a select list where nothing makes sense to select by default.

drewish’s picture

sun, i don't follow you. using the radio buttons is the current behaviour in core. in either case the user needs to be able to affect the setting, which they cannot do now.

sun’s picture

Status: Needs review » Reviewed & tested by the community

ok, let's get this into D6

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Erm, if I understand it right, the real problem is that unless the settings form can be saved, the old toolkit is tried to be used. So the description will be quite inaccurate, as it says the GD toolkit will be used, but this is not the case. Or does Drupal fall back on the GD toolkit anyway, if the selected toolkit is not available anymore? Then why not reset the setting properly at that place, where the missing toolkit is recognized? Either way, this patch does not seem to be the right fix to me.

drewish’s picture

dpearcefl’s picture

Is this still an active issue?

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.