#81176IRRE + useCombination: overrideChildTca not working for ChildChild
Description
It isn’t possible to use the overrideChildTca feature on childChild inline records as created by the useCombination feature.
Demo Configuration
// parent record $GLOBALS['TCA']['parent']['columns']['inline_top_most_parent']['config'] = [ 'type' => 'inline', 'foreign_table' => 'child_table_mm', 'foreign_selector' => 'uid_local', 'foreign_unique' => 'uid_local', 'foreign_field' => 'uid_foreign', 'foreign_table_field' => 'tablenames', 'appearance' => [ 'useCombination' => TRUE, ] ]; // child record $GLOBALS['TCA']['child_table_mm']['columns']['uid_local']['config'] = [ 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'child_child_table', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, // overrideChildTca is not passed to formDataCompiler 'overrideChildTca' => [ 'columns' => [ 'items' => [ 'config' => [ 'type' => 'passthrough' ] ] ] ] ], // child child record $GLOBALS['TCA']['child_child_table']['columns']['items']['config'] = [ // overrideChildTca is not respected for field items if child_child_table is rendered as inline record 'type' => 'group', // [...] ],
*Possible Solution*
Set key ‘inlineParentConfig’ to the child’s field column configuration (defined by foreign_selector), before creating the form for childChild
--- typo3_src/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php 2017-04-18 17:03:50.000000000 +0000
+++ typo3_src-8.7.1.stage/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php 2017-05-10 10:49:22.172000000 +0000
@@ -136,6 +136,7 @@
'isInlineAjaxOpeningContext' => true,
'inlineStructure' => $inlineStackProcessor->getStructure(),
'inlineFirstPid' => (int)$inlineFirstPid,
+ 'inlineParentConfig' => $childData['processedTca']['columns'][$parentConfig['foreign_selector']]['config']
];
$childData['combinationChild'] = $formDataCompiler->compile($formDataCompilerInput);
}
@@ -557,6 +558,7 @@
'inlineTopMostParentUid' => $child['inlineTopMostParentUid'],
'inlineTopMostParentTableName' => $child['inlineTopMostParentTableName'],
'inlineTopMostParentFieldName' => $child['inlineTopMostParentFieldName'],
+ 'inlineParentConfig' => $child['processedTca']['columns'][$parentConfig['foreign_selector']]['config']
];
return $formDataCompiler->compile($formDataCompilerInput);
}Reviews 2
Related issues 2
History 57
-
Gerrit Code Review pushed patch set 1 for master to change 52744 status
NewUnder Review <span data-processor="relativetime" data-value="2017-05-10T14:11:16+00:00" > 05/10/17, 14:11 </span> -
Benni Mack changed status
Under ReviewNew <span data-processor="relativetime" data-value="2018-11-08T21:00:04+00:00" > 11/08/18, 21:00 </span> -
Ralf Hettinger changed Related to #64534 <span data-processor="relativetime" data-value="2021-10-11T04:02:54+00:00" > 10/11/21, 04:02 </span>
-
Oliver Hader changed Complexity
easymedium <span data-processor="relativetime" data-value="2023-07-26T15:31:22+00:00" > 07/26/23, 15:31 </span> -
Wolfgang Klinger changed Related to #111056 <span data-processor="relativetime" data-value="2026-10-14T14:20:35+00:00" > 10/14/26, 14:20 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96688 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-14T15:26:08+00:00" > 10/14/26, 15:26 </span>
I think the mentioned change is also not a proper solution.
This would require something like `overrideChildChildTca` as `overrideChildTca` should only overwrite the TCA of the `child` table but not the TCA of the `child-child` table or am i wrong?