Closed core23 closed 4 years ago
Problem is still present in the latest version (3.24.0) except links are wrong in edit action and correct in the show action.
I think, that problem is in DefaultRouteGenerator.php in method getCode where section someone provide the fullname
should be before section someone provide the fullname
, because I have embedded admin and child admin.
It should be like this PR https://github.com/sonata-project/SonataAdminBundle/pull/3082 for issue https://github.com/sonata-project/SonataAdminBundle/issues/2505
I will try to create PR, but this should help in the meatime to other people with this problem.
This can be fixed by specifying child route explicitly
class XxxxAdmin extends AbstractAdmin {
// ...
protected function configureSideMenu(ItemInterface $menu, $action, AdminInterface $childAdmin = null)
{
// ...
if ($this->isGranted('EDIT')) {
$menu->addChild('CHILDS', [
'uri' => $admin->generateUrl('app.admin.PARENT|app.admin.CHILD.list', ['id' => $id])
]);
}
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Environment
Subject
When you have two admins with a parent child relation and a show and edit action, you got different links in the tab menu.
Steps to reproduce
admin.xml
Expected results
viewing an edit action:
/admin/core23/invoice/invoice/10/sending/list
viewing a show action:/admin/core23/invoice/invoice/10/sending/list
Actual results
viewing an edit action:
/admin/core23/invoice/invoice/10/sending/list
viewing a show action:/admin/core23/invoice/sending/list?id=10
It looks like the
show
action is ignoring the parent prefix.