How to fix rules which unable to evaluate action?
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.