- ๐ท๐ดRomania bbu23
Well, thank you. You just saved me some time trying to figure out why one of mine didn't work :) After adding #tree I can finally see the values.
- ๐ฌ๐งUnited Kingdom joachim
Cool!
Tagging as Novice, maybe someone will find time to fix this!
- ๐ท๐ดRomania bbu23
and partially unrelated, file_save_upload will not work with a subform. Apparently the $form_field_name expects the container name instead of the file field name.
- ๐ฎ๐ณIndia Soham Sengupta
Soham Sengupta โ made their first commit to this issueโs fork.
- Merge request !8607Issue #3053890: SubformState should complain when the subform doesn't have #tree = TRUE โ (Open) created by Soham Sengupta
- Status changed to Needs review
7 months ago 1:46pm 1 July 2024 - ๐ฎ๐ณIndia Soham Sengupta
I have added the fix, now the method createForSubform() throws an exception if the #tree property is not set, for non empty forms.
Moving the issue to Needs Review state.
Thank you. - Status changed to Needs work
7 months ago 1:57pm 1 July 2024 - ๐ฌ๐งUnited Kingdom joachim
Looks like we already have inadvertent test coverage! :D
All of SubformStateTest is failing because the form arrays aren't setting #tree. So those need to be fixed, and there should be one extra test added there which doesn't set #tree and uses expectException().
- Status changed to Needs review
6 months ago 3:56pm 13 August 2024 - ๐ฌ๐งUnited Kingdom joachim
Fixed the unit tests.
I suspect most of the functional test failures are caused by the one form which I've fixed. Let's see!
- ๐บ๐ธUnited States smustgrave
Can issue summary be updated to the standard template, to mention the proposed solution is to throw an exception.
Then can mark.
Do wonder if this will break any contrib code and have to do the BC dance.
- ๐ฌ๐งUnited Kingdom joachim
Without #tree, your subform is broken. I don't know how config field forms were managing not to be!
- Status changed to RTBC
6 months ago 4:27pm 13 August 2024 - ๐บ๐ธUnited States smustgrave
That's fair, then throwing exception makes sense.
- ๐ณ๐ฟNew Zealand quietone
If #tree is required then this needs to be documented, and I can not find anything about that. Can we have a followup for that?
- Status changed to Needs work
5 months ago 5:06pm 11 September 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Without #tree, your subform is broken. I don't know how config field forms were managing not to be!
But they are. So this potentially will trigger exceptions against currently working code. Because it did against core. I don't think we should do that. Perhaps we can start with a triggering a warning and then move to an exception in the next major version.