asalanka asalanka - 4 months ago 7
PHP Question

I have this error in symfony 2.4.5 BloggerBlogBundle:Blog:show.html.twig

I have this error comes up on Symfony 2.4.5 for symblog tutorial [[Part 4] - The Comments Model: Adding comments, Doctrine Repositories and Migrations], Unexpected token "name" of value "with" ("end of statement block" expected) in BloggerBlogBundle:Blog:show.html.twig. This happend just after updating the blog show template to render the add blog form.


There was a change after symfony 2.3.

In show.html.twig, change this line:

{% render 'BloggerBlogBundle:Comment:new' with { 'blog_id': } %}


{{ render(controller( 'BloggerBlogBundle:Comment:new', { 'blog_id': } )) }}