0
votes

Hey webworker out there,

i have a mysterious Symfony error.

{{ render(controller('Bundle:Action')) }}

throws (Stack Trace Plain Text)

[1] Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("") in "::base.html.twig" at line 46. at n/a in /Users/christian/Web/SECRET/app/cache/dev/classes.php line 4730

[2] Symfony\Component\Routing\Exception\ResourceNotFoundException: at n/a in /Users/christian/Web/SECRET/app/cache/dev/appDevUrlMatcher.php line 4163

at appDevUrlMatcher->match('/_fragment') in /Users/christian/Web/SECRET/app/cache/dev/classes.php line 1419

In appDevUrlMatcher i can`t find any "_fragment", ResourceNotFoundException is thrown, render(controller throws Twig_Error_Runtime

Every Render Controller i create throws exactly this Error.

I have no Idea what to do :(

1

1 Answers

0
votes

You should indicate the right bundle namespace, the controller and the right action

{# app/Resources/views/base.html.twig #}

<div id="sidebar">
    {{ render(controller('AcmeArticleBundle:Article:recentArticles', { 'max': 3 })) }}
</div>
  • AcmeArticleBundle: is the bundle
  • Article: is the controller
  • recentArticles: is the action