Hi everybody, as I mentioned I think I found a bug in the Request component. Before submitting the issue I need you to confirm or advice me if this is really a bug and not a feature or misusing.
I resume, I have a main layout, which render a controller's response template, in that template I want to show the current route (app.request.attributes.get('_route')), but it will fail. If I try to get the current controller instead (app.request.attributes.get('_controller') it will succeed. And if I 'include' the template instead 'render' the controller (that returns the template as response) it will succeed also. So seeing that everything else works fine, I'm pretty sure this is a bug. But I need your opinion/advice to see if Im right. I would want to report it to Symfony's trac system. This is the scenario: I have a Layout.html.twig. on In I have: /** Store/layout.html.twig **/ {% render 'Store:Client:showMeTheCurrentRoute' %} {% block content %} {% endblock %} <!-- content block doesn't play any role in the issue, I show it here only for reading ease. --> ----- The controller: /** Store/ClientController **/ showMeTheCurrentRouteAction() { return $this->render('Store:Client:showMeTheCurrentRoute.html.twig'); } ------ The template: /** Store/Client/showMeTheCurrentRoute.html.twig /** {{ app.request.attributes.get('_route') }} ------- On That scenario, the route won't be printed, (also no error, warning, notice, nothing). If I change '_route' by '_controller' it will print the current controller. If I use 'include' instead 'render', it will succeed: /** Store/layout.html.twig **/ {% include 'Store:Client:showMeTheCurrentRoute.html.twig %} [?] -------- Hope you can tell me if this "IS" or "NOT" a bug -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
<<360.gif>>