Męcze się z brakiem odbioru parametru przez router.
multimedia_article_comment: pattern: /comment/{article_id} defaults: { _controller: MultimediaArticleBundle:Comment:create } requirements: _method: POST article_id: \d+
{{render (controller("MultimediaArticleBundle:Comment:new",{'article_id':article.id})) }} // linia 45
An exception has been thrown during the rendering of a template ("Some mandatory parameters are missing ("article_id") to generate a URL for route "multimedia_article_comment".") in MultimediaArticleBundle:Article:show.html.twig at line 45.
Sprawdziłem zmienną article.id - istnieje i zwraca numer artykółu.
public function newAction($article_id) { $article = $this -> getArticle($article_id); $comments = new Comments(); $comments -> setArticle($article); $form = $this -> createForm (new CommentsType(), $comments); 'comments' => $comments, 'form' => $form ->createView() )); }
Syntaktycznie nie widzę błędu, natomiast w technice nie mam doświadczenia
