How to fix rules which unable to evaluate action? I have created two rules to act on some events related to commerce products.
The first is to act on reference node delete event, to remove the product upon node delete.
the second is to delete the node upon expiration event using node_expire
When running the cron to make expired event to be happen no actions executed except if I disabled the first rule
I have tried rules components and rule sets as that two rules have conditions and actions in common But nothing changed.
Edit:
I did some debugging and found that warning and error messages

[warning]
WD rules: Unable to load commerce_product with id &quot;102&quot;
WD rules: Unable to evaluate action entity_fetch.
WD rules: Unable to get variable entity_fetched, it is not defined.
[error]
WD rules: Unable to evaluate action entity_delete.
The error:


  WD rules: Unable to get variable X, it is not defined.


means that Rules can't load the variable X.

If you're using contributed modules, please check if your rules are in the right order and the configuration is right, otherwise check the module issue queue for possible bug issues.

If you're using custom modules, please make sure that these rule variables are passed in the correct way.

For example if you've the following sample rule in hook_rules_action_info:

'foo_rule' =&gt; array(
  'label' =&gt; t('Foo rule'),
  'provides' =&gt; array(
    'object_to_send' =&gt; array(
      'type' =&gt; 'data',
      'label' =&gt; t('Data Object to pass'),
    ),
  ),
),


The object_to_send needs to provide the matching array key, e.g.:

return array( 'object_to_send' =&gt; $object);


So the next rule in sequence will "see" that variable, so you can use it.