1 commit 82027c3d7df7ca7d9558ae2d21e16eeda1f82333
\r
2 Author: Andreas Wolf <dev@a-w.io>
\r
3 Date: Tue Nov 10 10:37:17 2015 +0100
\r
5 [BUGFIX] Flexform DS not properly resolved in IRRE AJAX
\r
7 If multiple data structures are defined for a flex field, they are
\r
8 listed in the 'ds' entry of the field’s TCA config. In this case, the
\r
9 proper data structure needs to be resolved first before processing the
\r
10 inline request, the necessary steps for which are introduced by this
\r
15 Change-Id: Ie846ddd11efdf76b9249feb3a9d8a67b38de3983
\r
17 diff --git typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php
\r
18 index 9336141..4b2fe8b 100644
\r
19 --- typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php
\r
20 +++ typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php
\r
21 @@ -21,11 +21,13 @@ use TYPO3\CMS\Backend\Form\FormDataGroup\InlineParentRecord;
\r
22 use TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord;
\r
23 use TYPO3\CMS\Backend\Form\InlineStackProcessor;
\r
24 use TYPO3\CMS\Backend\Form\NodeFactory;
\r
25 +use TYPO3\CMS\Backend\Utility\BackendUtility;
\r
26 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
\r
27 use TYPO3\CMS\Core\DataHandling\DataHandler;
\r
28 use TYPO3\CMS\Core\Utility\GeneralUtility;
\r
29 use TYPO3\CMS\Core\Utility\MathUtility;
\r
33 * Handle FormEngine inline ajax calls
\r
35 @@ -62,10 +64,8 @@ class FormInlineAjaxController
\r
36 if (MathUtility::canBeInterpretedAsInteger($parent['uid'])) {
\r
38 $vanillaUid = (int)$parent['uid'];
\r
40 - // TcaInlineExpandCollapseState needs the record uid
\r
41 - 'uid' => (int)$parent['uid'],
\r
43 + // we need the full record to e.g. fetch the proper data structure
\r
44 + $databaseRow = BackendUtility::getRecord($parent['table'], $parent['uid']);
\r
48 @@ -85,9 +85,12 @@ class FormInlineAjaxController
\r
50 /** @var TcaDatabaseRecord $formDataGroup */
\r
51 $formDataGroup = GeneralUtility::makeInstance(InlineParentRecord::class);
\r
54 /** @var FormDataCompiler $formDataCompiler */
\r
55 $formDataCompiler = GeneralUtility::makeInstance(FormDataCompiler::class, $formDataGroup);
\r
56 $parentData = $formDataCompiler->compile($formDataCompilerInputForParent);
\r
58 $parentConfig = $parentData['processedTca']['columns'][$parentFieldName]['config'];
\r
60 // Child, a record from this table should be rendered
\r