#110192Undefined array key in FormFlexAjaxController::containerAdd() on new records
Description
Summary
Adding an item to a FlexForm `section/container` field fails on a new, unsaved record when the field’s data structure is resolved per-CType via `ds_pointerField`. `FormFlexAjaxController::containerAdd()` resolves the structure via `databaseRow.CType`, which is never populated for new records, so it falls back to the generic “default” structure – missing the CType-specific fields, hence the warning. No dot-notation needed to reproduce, so this is independent of the accordion fix already merged for #109727.
Steps to reproduce
Register a new `tt_content` CType with its own FlexForm data structure via the classic `ds_pointerField` pattern:
$GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds_pointerField'] = 'CType'; $GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds']['my_ctype'] = 'FILE:EXT:my_ext/Configuration/FlexForms/MyFlexForm.xml';where MyFlexForm.xml defines a
if ($command === 'new') {
$formDataCompilerInput['databaseRow']['uid'] = $databaseRowUid;
$typeField = $processedTca['ctrl']['type'] ?? null;
if ($typeField !== null && $recordTypeValue !== '') {
$formDataCompilerInput['databaseRow'][$typeField] = $recordTypeValue;
}
}</p></section></container>Reviews 1
Related issues 1
History 24
-
Martina Kratky changed Related to #109727 <span data-processor="relativetime" data-value="2026-07-13T11:13:27+00:00" > 07/13/26, 11:13 </span>
-
Georg Ringer changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2026-08-06T15:52:36+00:00" > 08/06/26, 15:52 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 95160 status
NewUnder Review <span data-processor="relativetime" data-value="2026-08-07T01:10:56+00:00" > 08/07/26, 01:10 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95160 <span data-processor="relativetime" data-value="2026-09-09T05:36:05+00:00" > 09/09/26, 05:36 </span>