1770 Posts in 495 Topics by 531 members
Blog Module
SilverStripe Forums » Blog Module » Creating new entry via frontend doesn´t work
Discuss the Blog Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 892 Views |
-
Creating new entry via frontend doesn´t work

15 October 2009 at 10:32pm
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. -
Re: Creating new entry via frontend doesn´t work

15 October 2009 at 11:26pm
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. -
Re: Creating new entry via frontend doesn´t work

16 October 2009 at 8:30am
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.
| 892 Views | ||
|
Page:
1
|
Go to Top |

