Closed mareckigit closed 3 years ago
``` sonata-project/admin-bundle 3.93.0 ```
Unable to find %s object with id: %s.
CRUDController.php final protected function assertObjectExists(Request $request): void is executed and parent ID is used to find child by ID.
final protected function assertObjectExists(Request $request): void
Here is used class of child and ID of parent: $this->getModelManager()->find($this->getClass(), $id);
$this->getModelManager()->find($this->getClass(), $id);
It worked well in my previous version of Sonata Admin Bundle: 3.77
Go to a tab of child admin with empty related objects. For example: if there is a new Thread and there is no Comments related to the Thread.
Empty grid.
404: Unable to find %s object with id: %s
How are you configuring the child admins? What is the URL path and the route name where you are experiencing this issue?
Environment
Sonata packages
show
``` sonata-project/admin-bundle 3.93.0 ```
Subject
Unable to find %s object with id: %s.
CRUDController.php
final protected function assertObjectExists(Request $request): void
is executed and parent ID is used to find child by ID.Here is used class of child and ID of parent:
$this->getModelManager()->find($this->getClass(), $id);
It worked well in my previous version of Sonata Admin Bundle: 3.77
Steps to reproduce
Go to a tab of child admin with empty related objects. For example: if there is a new Thread and there is no Comments related to the Thread.
Expected results
Empty grid.
Actual results
404: Unable to find %s object with id: %s