Bug #93061
closedflexform sections didn't save when all items are removed
100%
Description
When you create a flexform which only contains a section where you can add items then the romoval of all items is not saved.
Example flexform:
<T3DataStructure>
<ROOT>
<type>array</type>
<el>
<attributes>
<TCEforms>
<section>1</section>
<title>Attribute</title>
<type>array</type>
<el>
<attribute>
<title>Field</title>
<type>array</type>
<el>
<label>
<TCEforms>
<label>Label</label>
<config>
<type>input</type>
<required>1</required>
</config>
</TCEforms>
</label>
</el>
</attribute>
</el>
</TCEforms>
</attributes>
</el>
</ROOT>
</T3DataStructure>
1. Add a Attribute
2. Save
3. Remove the create Attribute
4. Save
5. Items still there.
When you have an additional field in the flexform which is required (and therefore always existent) the error didn't appear.
I compared the request which is send to the Server between 9 and 10 and in 9 the deleted element also get submitted, in 10 not.
The example screenshots are from different elements but you can see on the second one that the element that gets gets is also included.
I tried to go down the rabbit hole bit but I only noticed that the data which is inside the DataHandler didn't do any flexform check because the pi_flexform data is not available.
Files