Cannot change image toolkit setting after the .inc file is removed

drewish - January 28, 2007 - 00:03
Project:Drupal
Version:6.x-dev
Component:system.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

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.

AttachmentSizeStatusTest resultOperations
system_image_toolkit.patch1.51 KBIgnoredNoneNone

#1

drewish - January 28, 2007 - 00:08
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.

#2

drewish - April 3, 2007 - 04:17

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

#3

drewish - April 30, 2007 - 22:24

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

#4

drewish - April 30, 2007 - 22:37
Version:5.x-dev» 6.x-dev

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

AttachmentSizeStatusTest resultOperations
system.module_113385.patch1.49 KBIgnoredNoneNone

#5

sun - May 7, 2007 - 21:09

I'd rather stick to

<?php
 
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.

#6

drewish - May 16, 2007 - 18:39

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.

#7

sun - May 24, 2007 - 19:47
Status:needs review» reviewed & tested by the community

ok, let's get this into D6

#8

Gábor Hojtsy - July 11, 2007 - 21:43
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.

#9

drewish - February 8, 2008 - 17:30

marking http://drupal.org/node/80019 as a dupe

 
 

Drupal is a registered trademark of Dries Buytaert.