Actions
Bug #81176
openIRRE + useCombination: overrideChildTca not working for ChildChild
Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-05-10
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:
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); }
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52744
Updated by Benni Mack almost 6 years ago
- Status changed from Under Review to New
Updated by Ralf Hettinger almost 3 years ago
- Related to Bug #64534: useCombination: does not support foreign_types added
Updated by Sascha Egerer over 2 years ago
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?
Actions