When using the Channel Entries API to submit a new entry, the entry seems to be submitted without any problem.
However when I view the entry I notice that the field formatting for each custom field is setting to “XHTML”.
Looking through the exp_channel_data table it seems that for the field formatting columns, nothing is set for any custom fields. Not even the default set for that custom field.
Here’s my code
// Load libraries and api's
$this->EE->load->library('api');
$this->EE->api->instantiate('channel_fields');
$this->EE->api_channel_fields->fetch_custom_channel_fields();
$this->EE->api->instantiate('channel_entries');
$this->EE->api_channel_fields->settings = array();
$data = array (
'title' => 'This is a title',
'entry_date' => '1256954136';
'field_id_1' => 'This is my summary',
'field_id_2' => 'This is my body text'
);
$this->EE->api_channel_entries->submit_new_entry(1, $data);
I’ve noticed in other forum posts something about the documentation getting updated, but I guess it hasn’t been done yet…
Any ideas?