[drupal-devel] [bug] Image handling block on settings page provides no information if no toolkits are installed

Junyor drupal-devel at drupal.org
Tue Mar 22 08:07:50 UTC 2005


Issue status update for http://drupal.org/node/18093

 Project:      Drupal
 Version:      cvs
 Component:    system.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Mad Maks
 Updated by:   Junyor
-Status:       active
+Status:       patch
 Attachment:   http://drupal.org/files/issues/junyor.system.patch (927 bytes)

OK, 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.


Junyor



Previous comments:
------------------------------------------------------------------------

February 28, 2005 - 10:28 : Mad Maks

i have installed the cvs version yesterday (upgrade from 4.5.2) and now
i see at administration => settings a block with the titel image
handeling. But in that block there is nothing except a "1" . Is this a
now bug or did i do something wrong?
greetings
MM


------------------------------------------------------------------------

March 1, 2005 - 09:24 : Mad Maks

nobody?


------------------------------------------------------------------------

March 9, 2005 - 11:41 : Mad Maks

BrianH has posted a screenshot in http://drupal.org/node/18588


------------------------------------------------------------------------

March 19, 2005 - 21:25 : Junyor

Attachment: http://drupal.org/files/issues/system_5.patch (976 bytes)

I 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.


------------------------------------------------------------------------

March 20, 2005 - 10:18 : Mad Maks

thanks


------------------------------------------------------------------------

March 21, 2005 - 22:26 : Dries

Committed to HEAD.


------------------------------------------------------------------------

March 22, 2005 - 05:29 : TDobes

Forgive 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.


------------------------------------------------------------------------

March 22, 2005 - 08:49 : Junyor

@TDobes: You're correct, it's the wrong fix.  I'm looking into it again
now.





More information about the drupal-devel mailing list