-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Model Type: New created entity does not get selected on sortable collections #8201
Comments
Detected one further related issue while loading the new choice list by calling https://example.com/admin/core/get-form-field-element (RetrieveFormFieldElementAction). The problem is the FormEvents::PRE_SUBMIT listener in Symfony ChoiceType The data in the dispatched event is a array with exactly one item and this contains a comma separated list of items. In Order to resolve that i suppose the following solution:
Add the following method:
|
…#8201 Apply fix as proposed in sonata-project#8201 (comment)
…e collections sonata-project#8201 Apply fix as proposed in sonata-project#8201 (comment)
Environment
Sonata packages
show
PHP version
show
``` $ php -v PHP 8.3.10 (cli) (built: Aug 2 2024 16:00:00) (NTS) ```
Subject
When adding new Entity via "New" button, entity is created correctly but new created entity does not get selected automatically.
Problem
Because of
SonataAdminBundle/src/Resources/views/Form/form_admin_fields.html.twig
Line 557 in 73492af
SonataAdminBundle/src/Resources/views/CRUD/Association/edit_many_script.html.twig
Lines 332 to 342 in 73492af
The edit_many_script does not handle the returned id value correctly.
Proposed solution
Already tested it works
The text was updated successfully, but these errors were encountered: