EasyCorp / EasyAdminBundle

EasyAdmin is a fast, beautiful and modern admin generator for Symfony applications.
MIT License
4.09k stars 1.02k forks source link

Pretty url generate wrong urls #6540

Open ben29 opened 2 days ago

ben29 commented 2 days ago

When enable:

easyadmin:
  resource: .
  type: easyadmin.routes

I have 2 Folders that I always use. different Dashboard, different actions.

in:

App\Controller\Admin`

I have:

AdminDashboardController`

In:

App\Controller\Aff

I have:

AffDashboardController

In AffDashboardController, I have different configureMenuItems.

it's look like the pretty urls, doesn't care about the different AffDashboardController.

and it's generate urls of Admin to Aff dashboard.

php bin/console debug:router | grep page_edit

admin_page_edit GET|POST|PATCH ANY ANY /page/{entityId}/edit
affiliate_page_edit GET|POST|PATCH ANY ANY /page/{entityId}/edit

as you can see the "admin_page_edit" it's also generated to "affiliate_page_edit"

when I disable pretty urls. everything is working fine! the aff doesn't get admin urls!

I think the Generator doesn’t care about the namespace, or its only care about one Dashboard controller to use it globally.

another bug:

yield MenuItem::linkToDashboard('Dashboard', 'fa fa-home');

when I'm using the aff dashboard. it's always link to 'admin'.

ben29 commented 2 days ago

@javiereguiluz can you pls help?