I installed SS 2.3.3 with blog 0.2.1. Everything works fine except that I can´t write new entries with the blog manager. The form shows up, it can be submitted and the new entry finds it´s way to the database. My problem now: New entries don´t show neather in the frontend nor in the backend.
I appreciate your help.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Now I know why they do not show. In my _config.php i set
i18n::enable();
i18n::set_locale('de_DE');
Translatable::set_default_locale("de_DE");
Entries via the frontend get the locale "en_US". Now I need to find out how to change that.
I added one codeline to the BlogHolder_Controller:
$form->saveInto($blogentry);
$blogentry->ParentID = $this->ID;
$blogentry->Content = $form->datafieldByName('BlogPost')->dataValue();
$blogentry->Locale = "de_DE"; //Otherwise "en_US" will be set and the entries won´t show if site language isn´t english.
$blogentry->Status = "Published";
$blogentry->writeToStage("Stage");
$blogentry->publish("Stage", "Live");
This is a quiet cheap solution, maybe I´ll finde a better one.