5

I am developing a custom module which defines custom Triggers and Custom actions. When I add or change an action, this action doesn't inmediatelly appear in the select list of the Triggers admin page.

I refresh, flush all caches and even activate/desactivate the Trigger Unlock module (which seems to work), but now when I create a new custom action, I go nuts to make it appear.

You can appreciate in the image and code what I am talking about (notice the Description has not changed after update).

enter image description here

/**
 * Implementation of hook_action_info().
 */
function commercegate_action_info() {
    return array(
        'commercegate_show_message' => array(
            'description' => t('Show message 1.'),
            'type' => 'commercegate',
            'configurable' => false,
            'hooks' => array(
                'commercegate' => array('callback_sale','callback_cargeback'),
            )
        ),
        'commercegate_show_message2' => array(
            'description' => t('Show message 2.'),
            'type' => 'commercegate',
            'configurable' => false,
            'hooks' => array(
                'commercegate' => array('callback_sale','callback_cargeback'),
            )
        ),
    );
}

Anyone familiar with this problem? Thankyou

1

To allow a new action to appear on the triggers page, you need to visit the administration page at admin/settings/actions, or call actions_synchronize().

1
  • I have tried that, and it makes sense.. but no luck. In the actions admin page my custom actions are described but as much as I change them in the hook_action_info() the changes are not reflected... – Naoise Golden Jul 7 '11 at 17:45
1

It's actually hook_rules_action_info() not hook_action_info().

1
  • 1
    Actually, I just realized you might not be creating a rules action...but there it is if someone else has an issue creating a rules action. – Ethan Jan 27 '12 at 20:23
0

try this: uninstall and reinstall your module.

0

Check the permissions, sometimes it automatically is deselected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.