Problem with the Part II: Getting Started tutorial / Flow 5.3

Hello everybody,

hope it’s the right place for my question.

I tried to walk through the tutorial witch can be found here:

Everything went fine so far, but there is one thing that don’t work. When I try to create a new Blogpost I become this Error:

Argument 1 passed to Acme\Blog\Domain\Model\Post_Original::setBlog() must be an instance of Acme\Blog\Domain\Model\Blog, null given, called in /www/htdocs/***/***/***/blog/Packages/Libraries/neos/utility-objecthandling/Classes/ObjectAccess.php on line 259

I hope that someone could help me out with this issue.

Thanks in advance


Just for reference this has been solved in our slack in this thread together with Kilian:

The essential part is adding this to the controller

 * @param ViewInterface $view
 * @return void
protected function initializeView(ViewInterface $view) {
    $blog = $this->blogRepository->findActive();
    $this->view->assign('blog', $blog);

(And making sure that you add a use statement for the ViewInterface)

1 Like