UrlShortenerBundle
UrlShortenerBundle copied to clipboard
Undefined variable: routeElements
Hello
An exception has been thrown during the rendering of a template ("Notice: Undefined variable: routeElements in /var/www/html/Symfony/vendor/sly/url-shortener-bundle/Sly/UrlShortenerBundle/Router/Router.php line 57")
I have debugged a bit an I found that it "fails" at Router.php line 48 cause it returns false my entity Entity\Pregunta doesnt have a method getPregunta my route definition is AcmeBundle_pregunta_show: pattern: /pregunta/ver/{pregunta} defaults: { _controller: AcmeBundle:Pregunta:show }
I have used {pregunta} instead of {id} cause I think that is more readable. Should be better to look for the Entity identifier with relfection (reading Doctrine metadata) instead of looking for the "id" field in the route?
Thanks