I would like to propose a change to this module that will help guide administrators in configuration even if they haven't read the INSTALL.txt. Specifically, I think the status report mechanism is underutilized and could be leveraged to report problems or inconsistencies. Of particular interest:
- [Image gallery] Add a warning to the status report if the image gallery module is enabled and there are no image galleries defined. This warning could have a link to the gallery creation page.
- [Image import] Add an error to the status report if the image import directory does not exist or the web container cannot write to it.
- [Image import] Add an error to the status report if the image temp directory does not exist or the web container cannot write to it.
- [ImageMagick advanced options] If the ImageMagick Advanced Options module is installed but the image.imagemagick.inc is not installed such that image_get_available_toolkits() does not return the imagemagick toolkit, an error should appear on the status report.
Implementing these minor changes would have a noticeable impact on ease of identifying or diagnosing administration issues, particularly in cases in which the Drupal installation comes with the image module.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | image_267489_6.patch | 6.91 KB | paul.lovvik |
| #5 | image_267489_5.patch | 6.91 KB | paul.lovvik |
| #3 | image_267489.patch | 4.14 KB | drewish |
| #1 | imageStatus.patch | 7.91 KB | paul.lovvik |
Comments
Comment #1
paul.lovvik commentedI have created a patch that implements these checks using hook_requirements().
Comment #2
drewish commentedvery cool! anyone have a chance to review this?
Comment #3
drewish commentedlooks pretty good.
hook_requirements phpdoc comments aren't really necessary. usually you just say:
I joined some of the short lines... I used to be strict about wrapping at 80 chars but since most Drupal code doesn't I try to stick with the existing code. For the image module I only wrap comments at 80 chars.
Re-ordered some of the im_advanced code so that errors are returned then warning/okay.
Comment #4
paul.lovvik commentedThis patch looks great! Thank you for the careful look and rework.
Comment #5
paul.lovvik commentedThe patch in #3 is missing the modifications to the image_im_advanced module. This new patch includes the image_im_advanced modification.
Comment #6
paul.lovvik commentedChanged "else if" -> "elseif".
Comment #7
sunAll of those requirements except image_im_advanced_requirements() add nothing but cruft to the system status report. Please remove the other.
That said, shouldn't Image module check for availability of ImageMagick when it's configured to use it? (instead of image_im_advanced?)
Comment #8
sunThis was a nice idea, but it's not going to happen anymore.