[BUGFIX] Overriding TCA results in Exception 65/31965/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:13 +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/31965
Reviewed-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Christoph Buchli <cbuchli@snowflake.ch>
Tested-by: Christoph Buchli <cbuchli@snowflake.ch>
Reviewed-by: Tomas Norre Mikkelsen <tomasnorre@gmail.com>
Tested-by: Tomas Norre Mikkelsen <tomasnorre@gmail.com>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>

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
-                       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') {
                        // Getting the selector box items from system