-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PrettyUrl => entityId is not passed to the views #6535
Comments
This is likely issue #6523. You can check by commenting out any |
Thanks, commenting the line " #MenuItem::linkToDashboard('Dashboard', 'fa fa-home'), " from my DashboardController resolve the problem. |
Hmm... i my case, comment out |
This PR was squashed before being merged into the 4.x branch. Discussion ---------- Fix an edge-case when using pretty URLs This is an alternative to #6553. Fixes #6550, #6535, #6498. `@alexislefebvre` thanks a lot for contributing that PR and also, thanks a lot for the failing test reproducer in #6559, which helped me a lot. Commits ------- eaa6a5b Fix an edge-case when using pretty URLs
Closing as fixed in #6567 and available since version 4.16.1. |
Thanks! It works in my project, I removed the workaround. |
Describe the bug
I updated the version of my easyadmin to the version 4.14, to benefit from the new functionality of prettyUrl. This caused an error in the views, which no longer retrieve the value of the entityId variable.
I reinstalled symfony and easyadmin from 0, hoping to resolve the problem, but the bug is still present.
Inside the crudController, if i do: 'dd($context->getRequest());'
i can see that the line query/parameters is empty .
Variables entityId, crudAction and crudControllerFqcn are missing.
I don't know if i missed something, if it's a bug, or if the documentation is not complete enough.
Thanks for your help.
To Reproduce
EasyAdmin 4.14
Activate the prettyUrl: create file "config/routes/easyadmin.yaml"
with content:
"# config/routes/easyadmin.yaml
easyadmin:
resource: .
type: easyadmin.routes
"
Verify that routes have changed and are ok.
Go to an edit form =>
ERROR:
"
An exception has been thrown during the rendering of a template ("Some mandatory parameters are missing ("entityId") to generate a URL for route "app_admin_user_edit".").
in C:\xampp\htdocs\falcon2\vendor\easycorp\easyadmin-bundle\src\Resources\views\menu.html.twig (line 7)
{% for menuItem in ea.mainMenu.items %}
"
(OPTIONAL) Additional context



The text was updated successfully, but these errors were encountered: