[BUGFIX] Load CSH for flexforms again 83/48383/4
authorWouter Wolters <typo3@wouterwolters.nl>
Sun, 29 May 2016 10:48:35 +0000 (12:48 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 3 Jun 2016 16:05:00 +0000 (18:05 +0200)
The cshKey is not correctly set up. Check for array as well and use
the first key if it exists.

Resolves: #73574
Releases: master,7.6
Change-Id: I263806a4628ea0cdb28413eefa3f9d2af4141a2c
Reviewed-on: https://review.typo3.org/48383
Tested-by: Marco Bresch <marco.bresch@starfinanz.de>
Reviewed-by: Marco Bresch <marco.bresch@starfinanz.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Form/Container/FlexFormNoTabsContainer.php
typo3/sysext/backend/Classes/Form/Container/FlexFormTabsContainer.php

index ff91b70..98c190e 100644 (file)
@@ -58,8 +58,10 @@ class FlexFormNoTabsContainer extends AbstractContainer
         $dsPointerFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$fieldName]['config']['ds_pointerField'], true);
         $parameterArray['_cshKey'] = $table . '.' . $fieldName;
         foreach ($dsPointerFields as $key) {
-            if ((string)$row[$key] !== '') {
+            if (is_string($row[$key]) && $row[$key] !== '') {
                 $parameterArray['_cshKey'] .= '.' . $row[$key];
+            } elseif (is_array($row[$key]) && isset($row[$key][0]) && is_string($row[$key][0]) && $row[$key][0] !== '') {
+                $parameterArray['_cshKey'] .= '.' . $row[$key][0];
             }
         }
 
index 70fd2da..18f97df 100644 (file)
@@ -62,8 +62,10 @@ class FlexFormTabsContainer extends AbstractContainer
             $dsPointerFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$fieldName]['config']['ds_pointerField'], true);
             $parameterArray['_cshKey'] = $table . '.' . $fieldName;
             foreach ($dsPointerFields as $key) {
-                if ((string)$row[$key] !== '') {
+                if (is_string($row[$key]) && $row[$key] !== '') {
                     $parameterArray['_cshKey'] .= '.' . $row[$key];
+                } elseif (is_array($row[$key]) && isset($row[$key][0]) && is_string($row[$key][0]) && $row[$key][0] !== '') {
+                    $parameterArray['_cshKey'] .= '.' . $row[$key][0];
                 }
             }