Скопировал примеры простого действия с мануала: http://drupal.org/node/298533
Получаю вот такое:
0 ms "After updating existing content" has been invoked.
0.265 ms Executing the rule "test" on rule set "After updating existing content"
0.68 ms Warning: Unable to get argument "0".
0.786 ms Element "Moe action" has not been executed. There are not all execution arguments available.
0.955 ms Evaluation of "After updating existing content" has been finished.
0.265 ms Executing the rule "test" on rule set "After updating existing content"
0.68 ms Warning: Unable to get argument "0".
0.786 ms Element "Moe action" has not been executed. There are not all execution arguments available.
0.955 ms Evaluation of "After updating existing content" has been finished.
Код модуля:
<?php
function cusrul_rules_action_info() {
return array(
'cusrul_action_node_set_author' => array(
'label' => t('Set the content author'),
'arguments' => array(
'node' => array('type' => 'node', 'label' => t('Content')),
'author' => array('type' => 'user', 'label' => t('User, which is set as author')),
),
'module' => 'Node',
),
);
}
function
cusrul_action_node_set_author($node, $author) {
$node->uid = $author->uid;
$node->name = 'xxx'.$author->name;
$node->title = 'xxx';
return array('node' => $node);
}
?>
Подскажите пожалуйста, кто сталкивался - что не так, ато топчусь на месте