EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

[BUG] Form disappears on global errors! (no active tab)

Open Ang3 opened this issue 3 years ago • 0 comments

Describe the bug The form diseappears on global form error.

To Reproduce Create an entity and the CRUD controller. Create a class constraint with a GLOBAL error (no associated property) and register it on top of your entity. Then, submit the form with the related violation. You should see the global error message, but the form disappeared!

Reason I think the problem is inside the EasyAdminTabSubscriber. The code only takes care about child errors and associated tabs. No case on global errors without property/tab errors. After some tests, I confirm the form metadata active is turned to false inside this file (not in the form and not in the theme):

https://github.com/EasyCorp/EasyAdminBundle/blob/390bb84cbaa90ace94c603825cdbdf79f4db74c2/src/Form/EventListener/EasyAdminTabSubscriber.php#L23-L52

(OPTIONAL) Additional context EasyAdmin: v4.3.4 Symfony: v6.0.11

Ang3 avatar Aug 12 '22 10:08 Ang3