asalanka asalanka - 1 year ago 74
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.

Answer Source

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': } )) }}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download