Hello
We
have been struggling with creating content dynamically since upgrading
to Seblod 3.14 (now 3.14.1) and Joomla 3.8. We have been using
the following code (taken from here:
https://www.seblod.com/resources/tutorials/create-content-dynamiclly-using-code):
$content = new \JCckContent(array('joomla_article'));
$insertId = $content->create(
'prijemce',
array(
'title' => "CUSTOM RECIPIENT: " . \JFactory::getDate()->toSql(),
'catid' => 26,
'state' => 1,
'language' => '*',
'publish_up' => (new \Jdate()),
'created_by' => \JFactory::getUser()->id),
$ourCustomData );
In
SEBLOD 3.14 the „create“ method raised an error. This was fixed in
3.14.1, but still the method does not create the content. We think
that the issue can be caused by the following condition in the „create”
method in libraries/cms/cck/content.php script. Since the condition is
met the method just returns false and does not proceed with creating the
content.
if ( $this->_id ) { return false; }
Thanks for possible help.
Michal