0

I'm trying to create new content with:

// Get suggestions template and update with values
$content = $this->app['storage']->getEmptyContent('suggestions');
$content->values['title'] = $title;
$content->values['description'] = $description;

// Save to db
$save = $this->app['storage']->saveContent($content);

status is set as publish in data returned from getEmptyContent.

When I visit the backend, I can see that the save status is None. How can I actually create it so that it is published?.

babbaggeii
  • 7,577
  • 20
  • 64
  • 118

1 Answers1

0

This sounds like it could be a bug since as far as I can remember some value should make it through to status by default. One thing to check, in your contenttypes.yml file for suggestions you can also add a default_status eg:

default_status: publish

If you still have no luck then raise an issue on Github.

Ross Riley
  • 826
  • 5
  • 8