Closed (duplicate)
Project:
Drupal core
Version:
x.y.z
Component:
system.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2005 at 09:28 UTC
Updated:
23 Mar 2005 at 23:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
Mad Maks commentednobody?
Comment #2
Mad Maks commentedBrianH has posted a screenshot in http://drupal.org/node/18588
Comment #3
junyor commentedI think the problem is that no image toolkits are installed at your host. Here's a patch that should clean up things a bit by adding information if no toolkits are available.
Comment #4
Mad Maks commentedthanks
Comment #5
dries commentedCommitted to HEAD.
Comment #6
TDobes commentedForgive me if this is totally incorrect, but...
A cursory glance at this patch seems to indicate that it's not the correct fix. The
image_toolkit_invoke('settings')only gets called if there is more than one toolkit. What if there's only one toolkit installed and it has settings available?Also, the else clause is encountered if the number of toolkits is not greater than one (in other words: less than two). The else clause tells the user that there are NO toolkits. Isn't this message inaccurate if there's only one toolkit? For that matter, won't there always be at least one toolkit because we bundle one in image.inc?
If we've decided that there will never be any settings from the core toolkit, perhaps we should just change the text to read "There are no extra toolkits installed, so image manipulation will be done using gd2." or something like that. From a user's perspective, the "no toolkits" message would be interpreted as "you can't manipulate images", which is not the case.
Feel free to correct me if I'm wrong here... I haven't yet thoroughally looked over the image handling code.
Comment #7
junyor commented@TDobes: You're correct, it's the wrong fix. I'm looking into it again now.
Comment #8
junyor commentedOK, the problem seems to be that image_gd_settings() returns TRUE. So, if there's only one toolkit installed, you'll just see "1" in the image handling section on the settings page. I had thought that "image_toolkit_invoke('settings')" was supposed to show settings for an image toolkit, not verify that the toolkit is installed.
Here's a new patch that corrects the problem in the first patch. If only one toolkit is installed and working, it prints a message saying the toolkit is ready for use. If no toolkits exist, the same message as in the previous patch is printed.
If no message should be printed if no settings are available (only one toolkit is installed or no toolkits are installed), I can roll another patch.
Comment #9
TDobes commentedI was under the same impression as Junyor that toolkits were supposted to have a settings hook such that there might be a unified place for configuration. (i.e. location of binaries if one is using imagemagick)
Perhaps walkah (who wrote the image.inc code IIRC) could clarify on this?
It looks like the problem was introduced by this patch, which is where the idea seems to have originated that the settings hook might be used to determine whether a toolkit exists or not. My guess is that we need to remove the "return true" from image_gd_settings and instead return a message like "You are using the GD toolkit, which has no configurable settings." or something along those lines. This would avoid breaking the check for toolkit existance based on the settings hook while fixing the problems it caused.
See also: Stefan's UI consistency comments
Comment #10
junyor commentedYep, that looks like the place this problem started. A settings function should return available settings, not tell whether the functionality is really available.
I'm setting this back to active, as there are a couple things that need to be decided before we can precede:
Comment #11
TDobes commentedI believe these issues have been adressed by this issue's patch. If not, feel free to reopen.