Skip to content
Snippets Groups Projects
Commit b6cbf352 authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Stefan Bürk
Browse files

[BUGFIX] Simplify regex for form finisher FlexForm overrides

EXT:form automatically generates FlexForm for form finisher overrides
based on YAML configuration in the `finishersDefinition.FormEngine`
sub-array. Since the removal of `TCEforms` for FlexForm (#97126), the
regex to match valid FlexForm fields did a "too good" job and also
added fields from section containers. These were guarded by a negative
lookbehind `(?>!\.TCEforms)`. Note the dot. This basically means ignore
anything, which has something else before TCEforms (=sections).

This was mostly fixed with #101050 by ignoring anything with a dot
before `config.type`. Sadly, this also ignored FlexForm identifiers with
dots in their name. In this case `translation.language.config.type`.

This whole regex thing is a mess and partially was the reason these
issues started as soon as something changed in the FlexForm syntax. Now,
in order to fix this, section containers are kicked from the array with
plain old PHP logic. This way we don't need to come up with a super
smart regex like "anything that ends with `config.type` but not preceded
by `_arrayContainer`". I tried and I failed.

Resolves: #102250
Related: #101050
Related: #97126
Releases: main, 12.4
Change-Id: I5549bdcfcda1b8dc014c11933b140d5c671c36e1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81558


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 17bec443
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment