I find this bug,
$rule = new stdClass();
$rule->disabled = FALSE; /* Edit this to true to make a default rule disabled initially */
$rule->api_version = 1;
$rule->ruleid = '7';
$rule->rulename = 'Big words';
$rule->name = 'big_words';
$rule->field_name = 'body';
$rule->col = 'value';
$rule->entity_type = 'node';
$rule->bundle = 'page';
$rule->validator = 'max_words';
$rule->data = '10';
$rule->error_message = 'test erroe message';
$export['big_words'] = $rule;
$rule->ruleid = '7'; This line is meaningless. We could remove it directly, and the code works.
I do not know how to prevent it add this line.This is the first time I build module base on ctools export API. Maybe I make a mistake at some place.
Comments
Comment #1
g089h515r806 commentedfixed in latest code. add one line in install file:
'no export' => TRUE,
Comment #2
g089h515r806 commentedComment #7.0
(not verified) commentedremove html tag in code tag