You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I'm accessing /edit-product/2 url and viewing performed DB queries in Web Profiler.
When I click on Explain query link I'm getting An error occurred while loading the query explanation. message instead of actual EXPLAIN and Developer Console of Browser shows that underlying AJAX request failed with HTTP 500 response.
Looking deeper shows that error was:
An exception has been thrown during the rendering of a template ("You have requested a non-existent service "templating". Did you mean one of these: "templating.helper.logout_url", "templating.helper.security"?"). (500 Internal Server Error)
Using
Product
entity from https://symfony.com/doc/current/doctrine.html documentation and modifiedDefaultController::editAction
to:Product $product
parameter@Route("/edit-product/{product}")
annotationThen I'm accessing
/edit-product/2
url and viewing performed DB queries in Web Profiler.When I click on
Explain query
link I'm gettingAn error occurred while loading the query explanation.
message instead of actual EXPLAIN and Developer Console of Browser shows that underlying AJAX request failed with HTTP 500 response.Looking deeper shows that error was:
The https://github.com/doctrine/DoctrineBundle/blob/master/Controller/ProfilerController.php#L82 code is using
templating
service without checking if it exists upfront. It should be doing check like inControllerTrailt::render
method (see https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php#L231-L247) instead.P.S.
I've used Symfony Flex to create a project and templates are rendered correctly with Twig.
The text was updated successfully, but these errors were encountered: