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: | patch (code 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.
| Attachment | Size |
|---|---|
| system_image_toolkit.patch | 1.51 KB |

#1
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_toolkitvariable.#2
someone else ran into this over on: http://drupal.org/node/132833
#3
i think that http://drupal.org/node/137755 and http://drupal.org/node/140401 would both be helped by this
#4
since this still affects HEAD i've rolled a patch that applies without offset
#5
I'd rather stick to
<?phpif (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
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
ok, let's get this into D6
#8
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
marking http://drupal.org/node/80019 as a dupe