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

g089h515r806’s picture

fixed in latest code. add one line in install file:
'no export' => TRUE,

'ruleid' => array(
        'type' => 'serial',
        'description' => 'Unique identifier of the validation rule',
        'unsigned' => TRUE,
        'not null' => TRUE,
       'no export' => TRUE,
),

g089h515r806’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

remove html tag in code tag