Issue Bug Closed

#108609A field of type flex in the page properties is causing problems. Argument #1 ($subSchema) must be of type string, int given, called in ./vendor/typo3/cms-core/Classes/Configuration/FlexForm/FlexFormTools.php on line 738

David Zach 01/09/26, 13:42 updated 03/31/26, 08:59

Description

Example TCA: https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Flex/Index.html

Error:

Oops, an error occurred!
TYPO3\CMS\Core\Schema\TcaSchema::hasSubSchema(): Argument #1 ($subSchema) must be of type string, int given, called in ./vendor/typo3/cms-core/Classes/Configuration/FlexForm/FlexFormTools.php on line 738

Request: 0fe86fad7fac1

Code for reproduction in the TCA:

<?php

defined('TYPO3') or die('Access denied.');

// Register fields
$GLOBALS['TCA']['pages']['columns'] = array_replace_recursive(
    $GLOBALS['TCA']['pages']['columns'],
    [
        'flex_2' => [
            'label' => 'flex_2 section container',
            'config' => [
                'type' => 'flex',
                'ds' => '
<T3DataStructure>
    <sheets>
        <sSection>
            <ROOT>
                <sheetTitle>section</sheetTitle>
                <type>array</type>
                <el>
                    <section_1>
                        <title>section_1</title>
                        <type>array</type>
                        <section>1</section>
                        <el>
                            <container_1>
                                <type>array</type>
                                <title>container_1</title>
                                <el>
                                    <input_1>
                                        <label>input_1 description</label>
                                        <description>field description</description>
                                        <config>
                                            <type>input</type>
                                        </config>
                                    </input_1>
                                    <color_1>
                                        <label>color_1</label>
                                        <config>
                                            <type>color</type>
                                            <size>10</size>
                                        </config>
                                    </color_1>
                                </el>
                            </container_1>
                            <container_2>
                                <type>array</type>
                                <title>container_2</title>
                                <el>
                                    <text_1>
                                        <label>text_1 default "foo"</label>
                                        <config>
                                            <type>text</type>
                                            <default>foo</default>
                                        </config>
                                    </text_1>
                                </el>
                            </container_2>
                        </el>
                    </section_1>
                </el>
            </ROOT>
        </sSection>
        <sSection2>
            <ROOT>
                <sheetTitle>section2</sheetTitle>
                <type>array</type>
                <el>
                    <section_2>
                        <title>section_2</title>
                        <type>array</type>
                        <section>1</section>
                        <el>
                            <container_1>
                                <type>array</type>
                                <title>container_1</title>
                                <el>
                                    <input_1>
                                        <label>input_1 description</label>
                                        <description>field description</description>
                                        <config>
                                            <type>input</type>
                                        </config>
                                    </input_1>
                                    <color_1>
                                        <label>color_1</label>
                                        <config>
                                            <type>color</type>
                                            <size>10</size>
                                        </config>
                                    </color_1>
                                </el>
                            </container_1>
                            <container_2>
                                <type>array</type>
                                <title>container_2</title>
                                <el>
                                    <text_1>
                                        <label>text_1 default "foo"</label>
                                        <config>
                                            <type>text</type>
                                            <default>foo</default>
                                        </config>
                                    </text_1>
                                </el>
                            </container_2>
                        </el>
                    </section_2>
                </el>
            </ROOT>
        </sSection2>
    </sheets>
</T3DataStructure>
                ',
            ],
        ]
    ]
);

// Assign position to fields
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', 'flex_2', '1,3,4', 'after:title');

Reviews 2

History 27

  1. David Zach commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-01-12T21:15:13+00:00" > 01/12/26, 21:15 </span>

    Applied in changeset commit:bf2cec7213f952f1fdf8855074e75db36fe8d49f.