(no commit message)
authorChristian Weiske <cweiske@cweiske.de>
Tue, 1 Dec 2015 11:13:15 +0000 (12:13 +0100)
committerwww-cweiske <www-cweiske@localhost.localdomain>
Tue, 1 Dec 2015 11:13:15 +0000 (12:13 +0100)
typo-core-fal-patch.diff [new file with mode: 0644]

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