I am updating a project to TYPO3 8LTS and I am using the latest version of flux and fluidcontent. It works most of the time. However I have an issue that I could not solve without digging too deep into flux and core. So maybe sombody here can spot the issue on my part and save me some debugging.
I have a fluidcontent element with expandable objects. It is an accordion where the editor can add as many panels as needed. The configuration looks like this:
<f:section name="Configuration">
<flux:form id="accordion">
<flux:form.option name="group" value="Container" />
<flux:form.option name="icon" value="EXT:my_ext/Resources/Public/Images/ContentIcons/Accordion.jpg" />
<flux:form.section name="panels">
<flux:form.object name="panel">
<flux:field.input name="title" />
<flux:field.checkbox name="active" />
</flux:form.object>
</flux:form.section>
</flux:form>
<flux:grid>
<f:for each="{panels}" as="panel" iteration="iteration">
<flux:grid.row>
<flux:grid.column name="column.{iteration.index}"
label="{f:if(condition: panel.panel.title, then: panel.panel.title, else: 'Panel {iteration.cycle}')}" />
</flux:grid.row>
</f:for>
</flux:grid>
</f:section>
This works like intended. It is possible to add and remove panels. However if I create a new content element and add some panels and then save&close the content element for the first time I get a core error message, telling me
"_1: Attempt to insert record on page '[root-level]' (0) where this table, tt_content, is not allowed_".
The created content element was stored correctly in the database with all fields but the pi_flexform field where the configuration of the panels is stored. That field is empty. I can now edit the element and create panels and the configuration is saved successfuly.
The error only occurs the first time a new content element is saved.
The issue was identified as core regression in the meantime. A fix will (hopefully) be included in one of the next LTS releases.