Skip to content
Snippets Groups Projects
Commit a29d7717 authored by Christian Kuhn's avatar Christian Kuhn Committed by Markus Klein
Browse files

[BUGFIX] FormEngine: Inline records open after first save

After creating and saving new inline elements, those elements
should be open by default. This was the case earlier, but broke
somewhere during FormEngine refactoring.

The patch restores this functionality. However, this patch is
restricted for master only since various scenarios are possible
that lead to funny open/close state. Those need further work.

Change-Id: I3b7dd6ebb5141f00317ef508b94ac41f4d44d265
Resolves: #76360
Releases: master
Reviewed-on: https://review.typo3.org/48378


Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent 60182c41
No related merge requests found
......@@ -56,6 +56,7 @@ class FormInlineAjaxController
$inlineStackProcessor = GeneralUtility::makeInstance(InlineStackProcessor::class);
$inlineStackProcessor->initializeByParsingDomObjectIdString($domObjectId);
$inlineStackProcessor->injectAjaxConfiguration($ajaxArguments['context']);
$inlineTopMostParent = $inlineStackProcessor->getStructureLevel(0);
// Parent, this table embeds the child table
$parent = $inlineStackProcessor->getStructureLevel(-1);
......@@ -125,6 +126,10 @@ class FormInlineAjaxController
'inlineParentTableName' => $parent['table'],
'inlineParentFieldName' => $parent['field'],
'inlineParentConfig' => $parentConfig,
// Fallback to $parentData is probably not needed here.
'inlineTopMostParentUid' => $parentData['inlineTopMostParentUid'] ?: $inlineTopMostParent['uid'],
'inlineTopMostParentTableName' => $parentData['inlineTopMostParentTableName'] ?: $inlineTopMostParent['table'],
'inlineTopMostParentFieldName' => $parentData['inlineTopMostParentFieldName'] ?: $inlineTopMostParent['field'],
];
if ($childChildUid) {
$formDataCompilerInput['inlineChildChildUid'] = $childChildUid;
......
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