Issue Bug Closed

#110931FormEngine: file/inline records inside FlexForm fields cannot be expanded or collapsed (Bootstrap 5.3.2 regression)

Andreas Krämer 10/06/26, 12:31 updated 10/19/26, 20:46

Description

Problem

Inline child records (type=file, type=inline) that live inside a FlexForm field and (usually) contain a dot (e.g. settings.image) cannot be toggled in the backend form:

  • newly added records are rendered expanded and cannot be collapsed
  • already persisted records are rendered collapsed and cannot be expanded
  • no JavaScript error is thrown, the click simply does nothing

The same field configured directly in TCA (e.g. tt_content.image) works as expected.

Steps to reproduce

Register a plugin (or any tt_content type) with a FlexForm that contains a file field with a dot in its name:

<T3DataStructure>
    <sheets>
        <sDEF>
            <ROOT>
                <type>array</type>
                <el>
                    <settings.image>
                        <label>Image</label>
                        <config>
                            <type>file</type>
                            <allowed>common-image-types</allowed>
                            <maxitems>5</maxitems>
                        </config>
                    </settings.image>
                </el>
            </ROOT>
        </sDEF>
    </sheets>
</T3DataStructure>

Then create a content element of that type, add one or more images, and try to collapse (or expand) them.

Expected

The panels toggle like they do for tt_content.image.

Analysis

The DOM id of an inline child inside a FlexForm is built from the structure path and keeps the field name unchanged, so the dot ends up in the id (InlineStackProcessor::getStructureItemNameFromStructure(), implode('---', $levelData['flexform'])):

data-1-tt_content-495-pi_flexform---data---sDEF---lDEF---settings.image---vDEF-sys_file_reference-70_fields

This is a known Bootstrap regression introduced in 5.3.2 (twbs/bootstrap#39189, https://github.com/twbs/bootstrap/issues/39189) and fixed in 5.3.3 by twbs/bootstrap#39201 (https://github.com/twbs/bootstrap/pull/39201): getSelector() now runs every selector through parseSelector(), which applies CSS.escape() to every #id part, regardless of whether it came from data-bs-target or href.

Proposed solution

Update the bundled Bootstrap to 5.3.3 or newer.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Oliver Bartsch commented and changed status New Closed <span data-processor="relativetime" data-value="2026-10-19T20:46:08+00:00" > 10/19/26, 20:46 </span>

    Hey,

    I can confirm the behaviour on main. The panel button of inline and file children renders data-bs-target="#<objectId>_fields". Inside a FlexForm, the objectId includes the raw FlexForm field name, so a dotted name like settings.image produces a selector that matches nothing. The bundled Bootstrap (5.3.2) only escapes href targets, not data-bs-target.

    One correction on the cause: Bootstrap 5.3.2 has been bundled since late 2023. The TYPO3 regression comes from #109267 (“Migrate inline record panels to Bootstrap Collapse”, v14.2), which switched these panels to data-bs-target. The same problem for FlexForm section containers was already fixed in #109727 by hashing the field name in those ids. Inline/file children were not covered by that fix.

    This is already tracked in #110739 (and #110071), and a patch is under review there. I’m closing this one as a duplicate; please follow #110739.

    Cheers, Oli