Describe the bug
When user clicks on a link created by linkToRoute it does not redirect to that new location. CRUD is not completelly updated: "New item" button is not working and data may not be updated.
To Reproduce
public function configureMenuItems(): iterable {
yield MenuItem::linktoRoute('Home', 'fa fa-home', 'home');
yield MenuItem::linktoRoute('Users', 'fa fa-home', 'users');
}
Some other related methods, like linkToCrud and linkToDashboard look misbehaving too.
I cannot reproduce... using 3.2.0 myself, my linktoRoute in the dashboard seems to work fine
BTW, if those entities are managed by EA, you need the linktoCrud method instead (which also works fine on 3.2.0)
BTW, if those entities are managed by EA, you need the linktoCrud method instead (which also works fine on 3.2.0)
I rolled back to 3.1.10 and linkToRoute works great. linktoCrud didn't work on 3.2.0 to me neither. Did you look to URL on your browser? I does not change between routes.
I am facing the same issue ! Neither _LinktoRoute_ nor _linktoDashboard_ would work !
Still not working to me on V3.2.1
https://user-images.githubusercontent.com/4864572/103455811-945e4480-4cf0-11eb-8372-8b4aa917710f.mp4
public function configureMenuItems(): iterable {
yield MenuItem::linktoRoute('Inicio', 'fa fa-home', 'inicio');
yield MenuItem::linkToRoute('Empresas', 'fa fa-building', 'empresa');
yield MenuItem::linktoRoute('Inspecciones', 'fa fa-check-square-o',
'inspeccion');
}
Can one of you please create a small example application that allows to reproduce this issue?
Can one of you please create a small example application that allows to reproduce this issue?
Just add a yield MenuItem::linktoRoute('MyName', 'fa fa-home', 'routename') to an existing CRUD you may have in the configureMenuItems() method, _RoutenameDashboardController.php._ Of course, _routename_ controller with its @Route notation on top must exist in your app.
I use it to browse between CRUD Dashboards (three of them). I replaced it to _linkToCRUD..._ same issue.
It works with me, 3.2.1
yield MenuItem::linktoRoute('Audit', 'fa fa-history ', 'dh_auditor_list_audits')
->setPermission('ROLE_ADMIN');
So we cannot reproduce without small example, because it works on my site
Globally, links work, if I link to a page, it works.
YET, if I link from "myapp/admin" to another dashboard "myapp/Whatever" the "admin" bit of the route is not updated to "Whatever" even if the route annotation exists in the destination dashboard.
Destination dashboard:
/**
* @Route("/Whatever", name="routename")
*/
The menu : on myapp/admin/
public function configureMenuItems(): iterable
{
return [
MenuItem::linktoDashboard('Admin', 'fa fa-home', 'routename'),
MenuItem::linktoRoute('Admin', 'fa fa-home', 'routename'), ];
}
The content of the page changes but not the menu.
It used to work before I updated...
It works with me, 3.2.1
yield MenuItem::linktoRoute('Audit', 'fa fa-history ', 'dh_auditor_list_audits') ->setPermission('ROLE_ADMIN');So we cannot reproduce without small example, because it works on my site
Globally, links work, if I link to a page, it works.
YET, if I link from "myapp/admin" to another dashboard "myapp/Whatever" the "admin" bit of the route is not updated to "Whatever" even if the route annotation exists in the destination dashboard.Destination dashboard:
/**
- @route("/Whatever", name="routename")
*/The menu : on myapp/admin/
public function configureMenuItems(): iterable
{
return [
MenuItem::linktoDashboard('Admin', 'fa fa-home', 'routename'),
MenuItem::linktoRoute('Admin', 'fa fa-home', 'routename'), ];
}
The content of the page changes but not the menu.
It used to work before I updated...
Page content changes, but not completely. For instance... Header does not change. In my case, it always says "Inspecci贸n" instead of "Empresas" whan I click on Empresa CRUD. You can watch it in my previous post, the video one.
If you're not going to make a small example project, people aren't able to mimic this, because for example I don't use multiple dashboard.
Especially javier is extremely busy, so I would advise to create a small app that illustrtes mimics this issue.
People aren't gonna do a lot of effort to mimic your specific situation.
If you're not going to make a small example project, people aren't able to mimic this, because for example I don't use multiple dashboard.
Especially javier is extremely busy, so I would advise to create a small app that illustrtes mimics this issue.
People aren't gonna do a lot of effort to mimic your specific situation.
Maybe that's the point: You are using only one dashboard. I use three of them. Is it a kind of EA restriction?
No it isn't as far as I know. You cab have multiple dashboards. But people cannot help you if we can't replicate the error, so unless you're able to supply a small reference project.
It is easy. Create a new project. Install easy admin, create two dashboards, create failing situation, push to github
New repo with that issue. Just click on "son" and see how you are not allowed to go to "father". Same behaviour when going to "father" and try to go to "son".
https://github.com/miguelgilmartinez/easyadminTest