I have some problem in triggering an action component.
I tryed to call it from the module function and from the devel/php page.

This is my component settings component settings

As you can see I have one node argument followed by 4 text arguments. And i'm trying to call it with this code

$node = node_load( 981 );
$return = rules_invoke_event('rules_send_mail', 
    '[email protected]', 
    'sss' );
print_r( $return );

Nothing is printed on the page.. not an array or a FALSE.
The action simply send and email to client_mail.

Can someone help me to understand why is not working?

1 Answer 1


if its a rule action component than it should be called by

 rules_invoke_component('name', $other_parameters..);

while rules_invoke_event() is suppose to trigger an event on which you might have different rules to act on.

  • 6
    Just a quick note-- to invoke the component, you need to make sure to put rules_ in front of the machine name for the name. Commented Nov 26, 2014 at 6:12
  • Mine is still failing to execute the action in rules_invoke_component because rules_get_cache('comp_' . $name) doesn't return a component object. Help??? Commented Nov 23, 2015 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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