Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to generate url to detail page inside index page after markAsInaccessible in pretty url #6732

Open
tito10047 opened this issue Jan 16, 2025 · 0 comments

Comments

@tito10047
Copy link

Describe the bug
EA cant generate url for null entity inside index page

To Reproduce
Inside EntityFactory in function createCollection is this:

            if (!$this->authorizationChecker->isGranted(Permission::EA_ACCESS_ENTITY, $newEntityDto)) {
                $newEntityDto->markAsInaccessible();
            }

when script acces inside this condition, then newEntityDto cleared the instance.

in AbscractCrudController is this method called in "index" function. after few lines down is called this:

$actions = $this->container->get(EntityFactory::class)->processActionsForAll($entities, $context->getCrud()->getActionsConfig());

Inside this is somewhere called generation url for detail page. but instance in dto object is null, so it crashed on null instance and I get this error

Parameter "entityId" for route "admin_order_detail" must match "[^/]++" ("" given) to generate a corresponding URL.

Is this description usefull for you? if not I can try reproduce it, but it will be dificult.
This error I get only in my tests. and it is only sometimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant