#105800Flex Form Field is inaccessible after the 13.4.2 update
Description
After the minor update, the Flex Form fields are no longer accessible. It is empty.
This worked under 13.4.1!
In Content Blocks:
fields:
- identifier: my_flexform
type: FlexForm
fields:
- type: Sheet
identifier: sheet1
label: Sheet 1
fields:
- identifier: section1
type: Section
label: Section 1
container:
- identifier: container1
label: Container 1
fields:
- identifier: container_field
type: Text
- identifier: container2
label: Container 2
fields:
- identifier: container_field2
type: Textarea
Translated to FlexForm XML definition:
<T3FlexForms>
<sheets type="array">
<sheet1 type="array">
<ROOT type="array">
<type>array</type>
<el type="array">
<field index="section1" type="array">
<title>Section 1</title>
<type>array</type>
<section>1</section>
<el type="array">
<field index="container1" type="array">
<title>Container 1</title>
<type>array</type>
<el type="array">
<field index="container_field" type="array">
<label>container_field</label>
<config type="array">
<type>input</type>
</config>
</field>
</el>
</field>
<field index="container2" type="array">
<title>Container 2</title>
<type>array</type>
<el type="array">
<field index="container_field2" type="array">
<label>container_field2</label>
<config type="array">
<type>text</type>
</config>
</field>
</el>
</field>
</el>
</field>
</el>
</ROOT>
</sheet1>
</sheets>
</T3FlexForms>
Bildschirmfoto%202024-12-10%20um%2014.54.38.png
Reviews 3
Related issues 1
Files 6
History 1421
-
Nikita Hovratov changed Complexity
easy<span data-processor="relativetime" data-value="2024-12-10T15:14:43+00:00" > 12/10/24, 15:14 </span> -
Oliver Bartsch commented and changed status
NewNeeds Feedback Complexity easy <span data-processor="relativetime" data-value="2024-12-10T15:20:00+00:00" > 12/10/24, 15:20 </span> -
Nikita Hovratov changed description status
Needs FeedbackNew Complexityeasy<span data-processor="relativetime" data-value="2024-12-10T15:22:27+00:00" > 12/10/24, 15:22 </span> -
Garvin Hicking changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2024-12-10T15:32:14+00:00" > 12/10/24, 15:32 </span> -
Nikita Hovratov changed Is Regression
1<span data-processor="relativetime" data-value="2024-12-10T15:58:02+00:00" > 12/10/24, 15:58 </span> -
Tiran Grigoryan commented and changed attached Bildschirmfoto 2024-12-10 um 17.00.42.png attached Bildschirmfoto 2024-12-10 um 17.01.48.png <span data-processor="relativetime" data-value="2024-12-10T16:04:33+00:00" > 12/10/24, 16:04 </span>
Oliver Bartsch wrote in #note-2:
> Hi, thanks for your report.
>
> Could you please share your template, so I can see which variable is accessed in the frontend.
>
> Best, Oli*Another example
*<f:debug>{_all}</f:debug>Typo3 13.4.1
Bildschirmfoto%202024-12-10%20um%2017.00.42.pngAnd after Typo3 13.4.2
composer update
Bildschirmfoto%202024-12-10%20um%2017.01.48.png
empty property
-
Nikita Hovratov commented and changed status
Needs FeedbackAccepted <span data-processor="relativetime" data-value="2024-12-10T17:22:23+00:00" > 12/10/24, 17:22 </span>Could you also share please your TCA, where you’ve defined the FlexForm field?
You probably used the “default” key, that’s why the transformed FlexForm array was just passed through, without further processing.
As a workaround, you could switch to FlexFormProcessor in your TypoScript, which will essentially bring back your old behavior.
In the meantine we will work on a proper solution, so that we have a real schema for Sections. -
Tiran Grigoryan commented <span data-processor="relativetime" data-value="2024-12-10T17:30:08+00:00" > 12/10/24, 17:30 </span>
Oliver Bartsch wrote in #note-2:
> Hi, thanks for your report.
>
> Could you please share your template, so I can see which variable is accessed in the frontend.
>
> Best, OliI was able to find where the error lies
In theFlexFormSchemaFactory->getSchemaForRecord
in v13.4.1 it always returned null for FlexForm -> Sections and Container.
As soon as I changed theRecordFieldTransformer->processFlexForm
debug line 246
$fieldInformationOfFlexField = $usedSchema->getField($fieldName);
it always returned null, because the usedSchema has no field, but section and container.
Therefore I have a solution:
..... 226: if ($usedSchema !== null) { $resolvedValues = []; // Flatten keys (because we receive settings[mysetting] and we want settings.mysetting) $flattenPlainValues = ArrayUtility::flattenPlain($plainValues); $recordFactory = GeneralUtility::makeInstance(RecordFactory::class); foreach ($flattenPlainValues as $fieldName => $plainFieldValue) { // That's a "fun" workaround: In order to allow to process e.g. "sDEF/header", we need // to add this to the "rawRecord" (thus, we clone it), so it is within the array // and then set "sDEF/header" even though this is not a DB field. Then we keep it in "$fieldName" // which actually is the plain field name (in this case "header") $fieldInformationOfFlexField = $usedSchema->getField($fieldName); // No field given, we just skip the value, as it is not properly defined if ($fieldInformationOfFlexField === null) { continue; } $rawRecordValues = array_replace($record->toArray(), [$fieldInformationOfFlexField->getName() => $plainFieldValue]); $fakeRawRecordWithFlexField = $recordFactory->createRawRecord($record->getMainType(), $rawRecordValues); $transformedValue = $this->transformField($fieldInformationOfFlexField, $fakeRawRecordWithFlexField, $context, $recordIdentityMap); $resolvedValues[$fieldName] = $transformedValue; } if (!empty($resolvedValues)) { return new FlexFormFieldValues(ArrayUtility::unflatten($resolvedValues)); } } ..... -
Tiran Grigoryan commented and changed attached Bildschirmfoto 2024-12-10 um 18.39.43.png <span data-processor="relativetime" data-value="2024-12-10T17:40:02+00:00" > 12/10/24, 17:40 </span>
Tiran Grigoryan wrote in #note-8:
> Oliver Bartsch wrote in #note-2:
> > Hi, thanks for your report.
> >
> > Could you please share your template, so I can see which variable is accessed in the frontend.
> >
> > Best, Oli
>
> I was able to find where the error lies
> In the
> […]
> in v13.4.1 it always returned null for FlexForm -> Sections and Container.
> As soon as I changed the
> […]
> debug line 246
> […]
> it always returned null, because the usedSchema has no field, but section and container.
>
> Therefore I have a solution:
> […]Bildschirmfoto%202024-12-10%20um%2018.39.43.png
-
Tiran Grigoryan commented and changed attached typo3-cms-core-flex.patch <span data-processor="relativetime" data-value="2024-12-11T07:44:59+00:00" > 12/11/24, 07:44 </span>
Tiran Grigoryan wrote in #note-9:
> Tiran Grigoryan wrote in #note-8:
> > Oliver Bartsch wrote in #note-2:
> > > Hi, thanks for your report.
> > >
> > > Could you please share your template, so I can see which variable is accessed in the frontend.
> > >
> > > Best, Oli
> >
> > I was able to find where the error lies
> > In the
> > […]
> > in v13.4.1 it always returned null for FlexForm -> Sections and Container.
> > As soon as I changed the
> > […]
> > debug line 246
> > […]
> > it always returned null, because the usedSchema has no field, but section and container.
> >
> > Therefore I have a solution:
> > […]
>
> Bildschirmfoto%202024-12-10%20um%2018.39.43.png -
Gerrit Code Review pushed patch set 1 for main to change 87431 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2024-12-11T10:09:03+00:00" > 12/11/24, 10:09 </span> -
Oliver Hader changed Related to #105621 <span data-processor="relativetime" data-value="2025-01-20T08:23:19+00:00" > 01/20/25, 08:23 </span>
-
Oliver Hader commented and changed Is Regression 1 <span data-processor="relativetime" data-value="2025-01-20T08:23:59+00:00" > 01/20/25, 08:23 </span>
I guess the new behavior (with 13.4.2) is related to the change for #105621
-
Gerrit Code Review pushed patch set 1 for main to change 89096 <span data-processor="relativetime" data-value="2025-04-13T12:48:49+00:00" > 04/13/25, 12:48 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 89096 <span data-processor="relativetime" data-value="2025-04-28T12:15:19+00:00" > 04/28/25, 12:15 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 89096 <span data-processor="relativetime" data-value="2025-04-28T12:30:02+00:00" > 04/28/25, 12:30 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 89096 <span data-processor="relativetime" data-value="2025-04-28T13:19:11+00:00" > 04/28/25, 13:19 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 89096 <span data-processor="relativetime" data-value="2025-04-28T14:12:36+00:00" > 04/28/25, 14:12 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 89263 <span data-processor="relativetime" data-value="2025-04-28T20:01:09+00:00" > 04/28/25, 20:01 </span>
-
Dennis Purisevic commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-04-28T20:05:07+00:00" > 04/28/25, 20:05 </span>Applied in changeset commit:95a53fb2873e355cb0ffbe2953e5ddaaf15a667d.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:37:08+00:00" > 12/02/25, 14:37 </span>
Hi, thanks for your report.
Could you please share your template, so I can see which variable is accessed in the frontend.
Best, Oli