Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
gd-toolkit.patch | 2.83 KB | Darren Oh | |
Comments
Comment #1
Darren OhAn equivalent patch for Drupal 5 is available in issue 102987, so this fix will not need to be ported.
Comment #2
greggles@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?
Comment #3
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedI have an install without GD and no image toolkit is offered.
Comment #4
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedStrange: 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.
Comment #5
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedok, 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.
Comment #6
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedok, some testing revealed that this indeed makes the form much better behaved.
Comment #7
(not verified) CreditAttribution: commented