Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.0
Component:
Exportables
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Apr 2012 at 13:25 UTC
Updated:
20 Apr 2012 at 00:51 UTC
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
Comment #1
merlinofchaos commentedIn 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. :)
Comment #2
g089h515r806 commentedThanks