When Image Resize Filter is installed, it automatically outputs a warning via drupal_set_message():

<?php

/**
 * Implements hook_install().
 */
function image_resize_filter_install() {
  drupal_set_message(t('The image resize filter has been installed. Before this does anything, the image resize filter needs to be added to one or more text formats. Visit the <a href="!url">text format administration</a> to set up this filter.', array('!url' => url('admin/config/content/formats'))), 'warning');
}

?>

I understand the purpose of this message, but I don't think this is the best place to do it.

It also creates an annoying issue when using Aegir to install a site via installation profile and Drush Make. Aegir marks the "Install" task with a yellow exclamation point because Drush Make spits out this module's warning. The site is built properly, but all site install tasks in Aegir are marked with a warning, instead of the green checkbox indicating a success.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m.stenta’s picture

Status: Active » Needs review
FileSize
685 bytes

Attached is a patch that removes the hook_install() implementation... for anyone who's using Drush Make and is sick of this warning.

m.stenta’s picture

Here's a chunk of code from my Drush makefile, for anyone interested:

; Patch the Image Resize Filter module...
projects[image_resize_filter][subdir] = "contrib"
projects[image_resize_filter][version] = "1.13"
; Get rid of the warning on installation.
projects[image_resize_filter][patch][] = "http://drupal.org/files/image_resize_filter_no_install_warning-2093315-1.patch"
mglaman’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

We've been using this in production to make Aegir happy.

  • ram4nd committed 41fb387 on 7.x-1.x authored by m.stenta
    Issue #2093315 by m.stenta: Don't output warning in hook_install
    
ram4nd’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.