Drupal doesn't check whether function_exists() for action callbacks. This means that if an action is assigned to a trigger and then the module that provides that action is disabled, Drupal still tries to run the action's callback, resulting in a fatal error because the callback function does not exist:

Fatal error: Call to undefined function action_email_role_send_email_action() in /path/to/my/site/includes/actions.inc on line 100

To duplicate:
  1. Enable a 3rd party module that provides an action (like Action Email Role)
  2. Assign the action to a trigger at admin/build/trigger (for example, assign 'action email role' to trigger 'after saving a new post')
  3. Disable the 3rd party module
  4. Do whatever it is you need to do to trip the trigger (in above, save a new post)

The attached patch fixes the issue, though there may be a more elegant way to do it.

CommentFileSizeAuthor
actions_exist.patch1.72 KBbecw

Comments

becw’s picture

Title: fatal error when 3rd party module providing actions is disabled » fatal error when disabled action is triggered
dave reid’s picture

Status: Active » Closed (duplicate)