The call to imageapi_get_available_toolkits() in hook_requirements() introduced here:

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/imageapi/im...

breaks install profiles. When installed at the same time as imageapi, imageapi_get_available_toolkits() will not be available in hook_requirements().

Will post an attempt to fix soon.

CommentFileSizeAuthor
#1 354719_install_profiles.patch1.27 KBalex_b
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alex_b’s picture

Status: Active » Needs review
FileSize
1.27 KB

This patch checks for the existence of the function before it calls it. Not ideal, I guess, but might fly as this condition will be only met in install profiles (?).

alex_b’s picture

I guess this issue also concerns 6.x

alex_b’s picture

Assigned: alex_b » Unassigned
drewish’s picture

The fix used in the D6 version is to check the phase.

  // Check this at runtime rather than install time because the order of
  // installation doesn't take dependencies into account. ImageAPI may have
  // been installed by not loaded and if we report a requirement error
  // because we can't find its function or no toolkit is enabled modules that
  // depend on us will still be enabled but will have a missing dependency.
  // Seems like a better idea to let everything get enabled and then inform
  // them of the problem.
  if ($phase == 'runtime') {
    if (count(imageapi_get_available_toolkits()) == 0) {
      $requirements['imageapi_toolkits'] = array(
        'title' => $t('ImageAPI Toolkit'),
        'value' => $t('No ImageAPI toolkits available'),
        'severity' => REQUIREMENT_ERROR,
        'description' => $t('ImageAPI requires a Toolkit such as ImageAPI GD or ImageAPI ImageMagick to function. Goto !modules and enable one of them.', array(
'!modules' => l('admin/build/modules', 'admin/build/modules'))),
      );
    }
  }
drewish’s picture

Status: Needs review » Closed (duplicate)