Issue Bug Closed

#100937Flexform sections in TCA inline fields are broken

B. Kausch 05/31/23, 13:29 updated 10/15/24, 09:30

Description

Let’s imagine a model with the name quiz. This quiz has an inline field questions, which collects items of the model quizquestion. TCA definition example:

        'questions' => [
            'label' => '',
            'config' => [
                'type' => 'inline',
                'foreign_table' => 'domain_model_quizquestion',
                'foreign_field' => 'quiz',
                'foreign_sortby' => 'sorting',
                'maxitems' => 9999,
                'appearance' => [
                    'collapseAll' => 0,
                    'levelLinksPosition' => 'top',
                    'showSynchronizationLink' => 1,
                    'showPossibleLocalizationRecords' => 1,
                    'useSortable' => 1,
                    'showAllLocalizationLink' => 1
                ],
            ],
        ],

Now the model quizquestion has a flexform field answers :

        'answers' => [
            'label' => '',
            'config' => [
                'type' => 'flex',
                'ds' => [
                    'default' => 'FILE:EXT:ext/Configuration/FlexForms/Answers.xml',
                ],
            ],
        ],

The flexform has sections:

<T3DataStructure>
    <sheets>
        <sDEF>
            <ROOT>
                <type>array</type>
                <el>
                    <answers>
                        <type>array</type>
                        <section>1</section>
                        <el>
                            <answer>
                                <type>array</type>
                                <title>Antwort</title>
                                <el>
                                    <text>
                                        <label>Text</label>
                                        <config>
                                            <type>string</type>
                                        </config>
                                    </text>
                                    <correct>
                                        <label>Ist korrekt?</label>
                                        <config>
                                            <type>check</type>
                                            <renderType>checkboxToggle</renderType>
                                        </config>
                                    </correct>
                                </el>
                            </answer>
                        </el>
                    </answers>
                </el>
            </ROOT>
        </sDEF>
    </sheets>
</T3DataStructure>

This just won’t work in the typo3 form backend. The sad result of this config:

clipboard-202305311529-r7j6c.png

Reviews 3

Files 1

History 812

  1. Nikita Hovratov commented 06/05/23, 17:56

    At first glance “TCEforms” is missing inside text and correct.

  2. Benni Mack changed Sprint Focus Stabilization Sprint 06/06/23, 12:49

  3. jku jku commented 08/25/23, 12:11

    I have this problem too and no work around. I guess it’s a problem with the gui. The flexform containers use the same generated ids.

  4. Georg Ringer changed Related to #97042 07/09/24, 20:15

  5. Gerrit Code Review pushed patch set 1 for main to change 85189 status New Under Review 07/09/24, 20:34

  6. Gerrit Code Review pushed patch set 2 for main to change 85189 07/09/24, 21:43

  7. Gerrit Code Review pushed patch set 3 for main to change 85189 07/10/24, 12:18

  8. Gerrit Code Review pushed patch set 1 for 12.4 to change 85230 07/11/24, 19:25

  9. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % 07/11/24, 19:45

    Applied in changeset commit:b7a3308b1435df05351ed71d10d7ec35d9ad6770.

  10. Benni Mack changed status Resolved Closed 10/15/24, 09:30

  11. Oliver Bartsch changed Related to #105492 10/28/24, 09:33