This my export code through Ctools export API.

  $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 unnecessary.
"ruleid" is the primary key of the field_validation_rule table. I do not want to include this line.
I do not know why my export object include the primary key which is a serial number.

I have checked the export of Ctools custom content:

$content = new stdClass();
$content->disabled = FALSE; /* Edit this to true to make a default content disabled initially */
$content->api_version = 1;
$content->name = 'company_user_register';
$content->admin_title = 'company user register';
$content->admin_description = '';
$content->category = '';
$content->settings = array(
....

At here the primary key cid is not included.

Is there anyone that could help me?

Comments

merlinofchaos’s picture

Status: Active » Fixed

In the schema, inside the definition for that field set 'no export' => TRUE

Then flush caches a lot. Schema is a pain to get flushed right. :)

g089h515r806’s picture

Thanks

Status: Fixed » Closed (fixed)

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