EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext::getEntity(): Return value must be of type EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto, null returned

Open dmitryuk opened this issue 7 months ago • 1 comments

Latest easycorp/easyadmin-bundle:4.24.5

Looks similar to #6914 , but couldn't fix same way Example code is too primitive:

<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Entity\Coupon;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;

class CouponCrudController extends AbstractCrudController
{
    public static function getEntityFqcn(): string
    {
        return Coupon::class;
    }
}

I will go to http://localhost/?crudAction=index&crudControllerFqcn=App%5CController%5CAdmin%5CCouponCrudController

Error thrown

EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext::getEntity(): Return value must be of type EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto, null returned

dmitryuk avatar May 27 '25 05:05 dmitryuk

It could be related to Pretty Admin URLs

emnsen avatar May 27 '25 12:05 emnsen