After installation of the Rules module, I created a Triggered rules that is supposed to :
- look if there is an image associated with the new created content (image into field_image)
- if yes, made the new content «Sticky» on publich (even by scheduler)
But it doesn't work :(
The code is below - does somebody understand where is the problem ?
Thanks for tips and help
Best
D.
array (
'rules' =>
array (
'rules_punaiser' =>
array (
'#type' => 'rule',
'#set' => 'event_node_insert',
'#label' => 'Punaiser contenu si images',
'#active' => 1,
'#weight' => '0',
'#categories' =>
array (
),
'#status' => 'custom',
'#conditions' =>
array (
0 =>
array (
'#weight' => 0,
'#info' =>
array (
'label' => 'Le champ \'field_image\' de created content a été modifié',
'arguments' =>
array (
'node' =>
array (
'type' => 'node',
'label' => 'Contenu contenant des modifications',
),
'node_unchanged' =>
array (
'type' => 'node',
'label' => 'Contenu ne contenant pas de modification',
),
),
'module' => 'CCK',
),
'#name' => 'content_rules_field_changed',
'#settings' =>
array (
'field_name' => 'field_image',
'#argument map' =>
array (
'node' => 'node',
'node_unchanged' => 'node',
),
),
'#type' => 'condition',
),
1 =>
array (
'#weight' => 0,
'#info' =>
array (
'label' => 'Created content is published',
'arguments' =>
array (
'node' =>
array (
'type' => 'node',
'label' => 'Contenu',
),
),
'module' => 'Node',
),
'#name' => 'rules_condition_content_is_published',
'#settings' =>
array (
'#argument map' =>
array (
'node' => 'node',
),
),
'#type' => 'condition',
),
),
'#actions' =>
array (
0 =>
array (
'#type' => 'action',
'#settings' =>
array (
'auto_save' => 1,
'#argument map' =>
array (
'node' => 'node',
),
),
'#name' => 'rules_core_node_make_sticky_action',
'#info' =>
array (
'label' => 'Mettre en lumière le created content',
'module' => 'Node',
'arguments' =>
array (
'node' =>
array (
'label' => 'Contenu',
'type' => 'node',
),
),
'base' => 'rules_core_action_execute',
'action_name' => 'node_make_sticky_action',
'configurable' => false,
'label callback' => 'rules_core_node_label_callback',
'label_skeleton' => 'Mettre en lumière le @node',
),
'#weight' => 0,
),
),
'#version' => 6003,
),
),
)