GD toolkit can be selected even if not installed

Darren Oh - December 12, 2006 - 22:40
Project:Drupal
Version:4.7.x-dev
Component:system.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The system settings page allows the GD toolkit to be selected even if it is not installed. The error is detected when the form is next loaded, rather than when it is submitted. The form error prevents any valid settings from being submitted.

The attached patch causes validation to be performed before the form is submitted rather than after. It patches both system.module and image.inc.

AttachmentSizeStatusTest resultOperations
gd-toolkit.patch2.83 KBIgnoredNoneNone

#1

Darren Oh - December 13, 2006 - 01:34

An equivalent patch for Drupal 5 is available in issue 102987, so this fix will not need to be ported.

#2

greggles - December 22, 2006 - 17:29

@Darren Oh - I'm curious about how to test this. Basically we need to have an installation with gd disabled and imagemagick enabled. Is that right?

#3

killes@www.drop.org - January 4, 2007 - 20:12

I have an install without GD and no image toolkit is offered.

#4

killes@www.drop.org - January 4, 2007 - 20:19

Strange: Once I copy image.imagick.inc to the includes directory, I get both GD and imagick offered. If I remove it again then there is no choice offered.

#5

killes@www.drop.org - January 4, 2007 - 20:38

ok, I understand now why I don't get a selection offered with only one toolset present. However I already get a validation error without this patch.

#6

killes@www.drop.org - January 4, 2007 - 21:11
Status:needs review» fixed

ok, some testing revealed that this indeed makes the form much better behaved.

#7

Anonymous - January 18, 2007 - 21:16
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.