From d657aa87e356417eae1105c78b60891177913f8d Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 1 Dec 2015 12:13:15 +0100 Subject: [PATCH] --- typo-core-fal-patch.diff | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 typo-core-fal-patch.diff diff --git a/typo-core-fal-patch.diff b/typo-core-fal-patch.diff new file mode 100644 index 0000000..e267cab --- /dev/null +++ b/typo-core-fal-patch.diff @@ -0,0 +1,60 @@ +commit 82027c3d7df7ca7d9558ae2d21e16eeda1f82333 +Author: Andreas Wolf +Date: Tue Nov 10 10:37:17 2015 +0100 + + [BUGFIX] Flexform DS not properly resolved in IRRE AJAX + + If multiple data structures are defined for a flex field, they are + listed in the 'ds' entry of the field’s TCA config. In this case, the + proper data structure needs to be resolved first before processing the + inline request, the necessary steps for which are introduced by this + patch. + + Resolves: #71436 + Releases: master + Change-Id: Ie846ddd11efdf76b9249feb3a9d8a67b38de3983 + +diff --git typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php +index 9336141..4b2fe8b 100644 +--- typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php ++++ typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php +@@ -21,11 +21,13 @@ use TYPO3\CMS\Backend\Form\FormDataGroup\InlineParentRecord; + use TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord; + use TYPO3\CMS\Backend\Form\InlineStackProcessor; + use TYPO3\CMS\Backend\Form\NodeFactory; ++use TYPO3\CMS\Backend\Utility\BackendUtility; + use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; + use TYPO3\CMS\Core\DataHandling\DataHandler; + use TYPO3\CMS\Core\Utility\GeneralUtility; + use TYPO3\CMS\Core\Utility\MathUtility; + ++ + /** + * Handle FormEngine inline ajax calls + */ +@@ -62,10 +64,8 @@ class FormInlineAjaxController + if (MathUtility::canBeInterpretedAsInteger($parent['uid'])) { + $command = 'edit'; + $vanillaUid = (int)$parent['uid']; +- $databaseRow = [ +- // TcaInlineExpandCollapseState needs the record uid +- 'uid' => (int)$parent['uid'], +- ]; ++ // we need the full record to e.g. fetch the proper data structure ++ $databaseRow = BackendUtility::getRecord($parent['table'], $parent['uid']); + } else { + $command = 'new'; + $databaseRow = []; +@@ -85,9 +85,12 @@ class FormInlineAjaxController + ]; + /** @var TcaDatabaseRecord $formDataGroup */ + $formDataGroup = GeneralUtility::makeInstance(InlineParentRecord::class); ++ ++ + /** @var FormDataCompiler $formDataCompiler */ + $formDataCompiler = GeneralUtility::makeInstance(FormDataCompiler::class, $formDataGroup); + $parentData = $formDataCompiler->compile($formDataCompilerInputForParent); ++ + $parentConfig = $parentData['processedTca']['columns'][$parentFieldName]['config']; + + // Child, a record from this table should be rendered -- 2.30.2