-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Added test to show that delete_empty don't work for embedded forms without data_class #22014
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
Conversation
…orms without data_class
// form is completely empty | ||
'entry_options' => array('data_class' => null), | ||
'allow_add' => true, | ||
'delete_empty' => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add 'allow_delete' => true
and try again? (#22008 (comment))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
(In this use case) A compound form is empty if their children are empty?
It is related to data mapper process I think, currently |
Thanks for the test. I'm closing the PR as it cannot be merge as is. It will still be referenced in the ticket so that the one working on a fix will have access to it. |
@yceruto made the right appointment. A compound form is empty if their children are empty? Today is: No if With this in mind #13601 comes in scene. If we could teach a form how to determine if it is empty, the problem reported here could be solved. |
…on. (Koc) This PR was merged into the 3.4 branch. Discussion ---------- [Form] Allow pass filter callback to delete_empty option. | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #13601, #13940, #22008, #22014 | License | MIT | Doc PR | coming soon Commits ------- 8630abe [Form] Allow pass filter callback to delete_empty option.
This pull request creates a test, that fails showing the problem with delete_empty and embedded forms without data_class.
Something needs to be fixed in the ResizeSubscriber or somewhere else that I couldn't find, so this test can pass.
Related to #22008