Review 12.4 Merged

85097[BUGFIX] Prevent multiple FlexContainers of same name

Oli Bartsch CR +2 V +2 Easy +2 −2 updated 07/03/24, 16:26

Commit message

It is possible in Flexform containers to set a XML
configuration that uses the same input field names,
but within different sheets.

The `FlexFormSectionContainer::render()` method used a
HTML DOM id attribute that did not consider
the Flexform sheet name, which has lead to the same id
attribute being re-used. The JavaScript events (add
and delete items from a container) would then
fire only on the first instance, but as many times
as there were wrongly regarded "duplicate" containers
using the same id.

This fix introduces another identifier section to the
id attribute, containing the Flexform sheet name.
This XML attribute is compatible
with allowed CSS class names, so no further escaping is
done with it, similar to the use of `$flexFormFieldName`.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
  • Verified V +2 Done
    • Oli Bartsch +2
    • core-ci +1 CI

Issues 2

Files 1

Review log 34

  1. Oli Bartsch uploaded patch set 1 07/03/24, 16:20

  2. core-ci voted on patch set 1 V +1 07/03/24, 16:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60917

  3. Oli Bartsch voted on patch set 1 CR +2 V +2 07/03/24, 16:26

  4. Oli Bartsch merged patch set 2 07/03/24, 16:26