Closed joneppie closed 9 years ago
Sidenote: I would not solve such requirement with nested sections. I would rather create a "normal" core CType element with a tca relation and nestability. That would buy you a much cleaner implementation + the ability to resolve FAL objects on those nested elements.
Flexforms and therefore Sections are basically not a good way to handle what you would call "content". It's acceptable and handy for settings, but should not be abused by storing content in it (like you seem to be doing).
I need it for a special form with options and there for suboptions. Thats no content and only settings.
@cedricziel, will this issue be fixed? Or should I use CType element?
I have the same problem. Is there a solution for this?
Fixed in development branch, will be in next TER version.
Unfortunately this is not yet solved. I tested it using TYPO3 7.2 and 7.4 and the latest dev-version of Flux (7.2.1, built Aug. 5th at 16:45 CET), and there are still some nasty issues here:
Clearly, something isn't right here. Sadly my real data element on the livesite is far too large for me to edit the XML manually, so right now I'm stuck.
i reopen this, but i think most issues are fixed or in a specific environment
The clock was ticking, so I ended up recreating the flexform as an extbase-model and reentering all the data, which gave me the added benefit of having a much nicer graphical interface. Still, nested sections in flexforms should work – and have done so perfectly until recently.
I don't know what to say... except I've tested and re-tested and re-re-re-re-re-re-re-tested this and it really is solved. There are no more stray sections (in sections, in sections). I promise.
<flux:form id="example" options="{group: 'FCE'}">
<!-- Insert fields, sheets, grid, form section objects etc. here, in this flux:flexform tag -->
<flux:form.section name="test">
<flux:form.object name="inner" label="Test object">
<flux:field.input name="field" label="Test" />
<flux:form.section name="test">
<flux:form.object name="inner2" label="Another test object">
<flux:field.input name="field2" label="Test 2" />
</flux:form.object>
</flux:form.section>
</flux:form.object>
</flux:form.section>
<flux:field.input name="blargh" label="Blah" />
</flux:form>
Now, the other error that you are facing is not related to this "insection" bug (which is solved). The one you have is caused by HTML field names being identical and causing collisions when you save the record, if you create more than one nested object per save. And this error is not caused by nor fixable in Flux - it is a core bug that would affect any DS; FlexForm, array and Flux alike.
I'm not sure when it began or if any attempts were made to solve it, but the JS that handles this should be replaced by now. I tested this in TYPO3 7.4.0 and to my surprise it still does this.
@DonGissel I'm closing this one since the original issue is fixed. Please report the remaining problem to the TYPO3 issue tracker ;)
If you use a section into a section, like this:
you get the innersection a second time below the outersection