Skip to content

"XXX" class is not a valid Dashboard controller... #6787

@gassan

Description

@gassan

Describe the bug
on first run (before container has been compiled) ea_url().setDashboard('XXX') throws error

`"XXX" class is not a valid Dashboard controller. Make sure it extends from "EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController" or implements "EasyCorp\Bundle\EasyAdminBundle\Contracts\Controller\DashboardControllerInterface"."

because
dashboardControllerRegistry->controllerFqcnToRouteMap is empty at the time.

To Reproduce
version 4.24.0 (symfony 7.2.3, php 8.3.16) with enabled pretty url feature
put
{{ ea_url().setDashboard('XXX') }} to index.html.twig

(OPTIONAL) Additional context

If they are useful, include logs, code samples, screenshots, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions