[BUGFIX] Overriding TCA results in Exception 43/32643/2
authorStefan Froemken <froemken@gmail.com>
Mon, 4 Aug 2014 08:15:24 +0000 (10:15 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Mon, 8 Sep 2014 14:11:34 +0000 (16:11 +0200)
This problem only occours when using "tree" as
display mode for TCA-type "select".
FlexForm-API brings a special configuration to add,
edit and remove items from a selectbox, but in
case of a select-tree it does not make sense. A
completely different API was called to render this tree.
This patch prevents modifying the select-tree.

Releases: 6.3, 6.2
Resolves: #54490
Change-Id: I3ad3c5c608d7968ba90117aa048014b00cfd44af
Reviewed-on: http://review.typo3.org/32643
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Classes/Form/FlexFormsHelper.php

index 9efa3b8..29361eb 100644 (file)
@@ -180,7 +180,7 @@ class FlexFormsHelper extends \TYPO3\CMS\Backend\Form\FormEngine {
                                \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($sheet[$fieldName]['TCEforms'], $fieldConf);
                        }
                        // Manipulate only select fields, other field types will stop here
                                \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($sheet[$fieldName]['TCEforms'], $fieldConf);
                        }
                        // Manipulate only select fields, other field types will stop here
-                       if (empty($field['TCEforms']['config']['type']) || $field['TCEforms']['config']['type'] != 'select') {
+                       if (empty($field['TCEforms']['config']['type']) || $field['TCEforms']['config']['type'] != 'select' || $field['TCEforms']['config']['renderMode'] === 'tree') {
                                continue;
                        }
                        // Getting the selector box items from system
                                continue;
                        }
                        // Getting the selector box items from system