This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report
Maybe I’m using this wrong, but I went from the example given.
.
ee()->load->library('api');
ee()->legacy_api->instantiate('channel_entries');
ee()->legacy_api->instantiate('channel_fields');
$data = array();
$data['title'] = ee()->input->post('post_title');
//$data['entry_date'] = ee()->input->post('date');
$data['field_id_2'] = ee()->input->post('job_title');
$data['field_ft_2'] = 'none';
ee()->api_channel_fields->setup_entry_settings(2, $data);
$success = ee()->api_channel_entries->save_entry($data, 2);
if ( ! $success)
{
$this->response(show_error(implode('
', $this->api_channel_entries->errors)));
}
This kept giving me a html response with the error “Exception Caught: No such property: ‘stats’ on EllisLab\ExpressionEngine\Legacy\Facade”.
So I found someone else had to add the ‘stats’ library to get it to work.
ee()->load->library('stats');
Is this something specific to the way I’m using this in my extension or should it be added to the documentation?
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```