Issue Bug Under Review

#111704FlexForm section container does not toggle when the sheet name contains a dot

Himanshu Nitsan 12/02/26, 10:00 updated 12/02/26, 10:02

Description

Sections in a FlexForm whose sheet key contains a dot (for example <sheet.tab1>) do not expand or collapse when the header is clicked. Adding an item works and the item renders, but the Bootstrap Collapse toggle does nothing.

Version: TYPO3 main (15.0.0-dev). Also reproduced on v14.3.12.

Steps to reproduce

  1. Create a FlexForm data structure with a dotted sheet key, for example <sheet.tab1>, containing a section field. DCE generates sheet keys as sheet.<tab variable>.
  2. Create a new record of that type and click “Add” on the section field.
  3. Click the header of the added section item.

Expected: the section item expands.

Actual: nothing happens. The header button has:

data-bs-toggle="collapse"
data-bs-target="#flexform-section-container-sheet.tab1-pi_flexform-..."

Cause

Bootstrap parses data-bs-target as a CSS selector, where . means class. The section container DOM id is built from the raw sheet name in:

  • FlexFormSectionContainer ($containerId and $sectionContainerId)
  • FlexFormContainerContainer ($parentSectionContainer)

Only the flex form field name and the element base name are hashed. #109727 / change 93917 hashed the field name, but not the sheet name, so a dotted sheet name yields an invalid selector.

Fix

Hash the sheet name with HashAlgo::canonicalize()->hash() in these three places, the same way the field name and element base name are already handled. The DOM id is not persisted, so no data migration is needed.

Verification

The styleguide flex_2 fixture gets a dotted sheet key (sSection.dotted) and a Playwright test expands the section container.

  • Before the fix: the test fails. data-bs-target keeps the raw sheet name and aria-expanded stays false.
  • After the fix: the test passes, and the existing dotted field name test still passes.

Reviews 1

History 34

  1. Himanshu Ramavat changed Related to #109727 12/02/26, 10:00

  2. Himanshu Ramavat changed Related to #110931 12/02/26, 10:01

  3. Himanshu Ramavat changed Related to #110192 12/02/26, 10:01

  4. Gerrit Code Review pushed patch set 1 for main to change 98277 status New Under Review 12/02/26, 10:02