Project

General

Profile

Actions

Bug #70696

closed

TCA field of type "select" is broken with renderMode = "tree" and maxitems = 1

Added by Felix Rauch over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2015-10-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Given a TCA field of the type "select", with the renderMode set to "tree" and maxitems set to "1", the tree non-functional. No item at all can be selected. If maxitems is set to "2", two items can be selected, as would be expected.

Sample TCA:

        'tree_foo' => array(
            'exclude' => 0,
            'label' => 'LLL:EXT:foo_bar/Resources/Private/Language/locallang_db.xlf:tx_foobar_domain_model_qux.tree_foo',
            'config' => array(
                'type' => 'select',
                'foreign_table' => 'pages',
                'foreign_table_where' => 'ORDER BY pages.sorting ASC',
                'maxitems' => 1,
                'renderMode' => 'tree',
                'autoSizeMax' => 40,
                'treeConfig' => array(
                    'appearance' => array(
                        'expandAll' => 1,
                        'showHeader' => 1,
                        'maxLevels' => 20,
                        'width' => 600
                    ),
                    'parentField' => 'pid',
                ),
            ),
        ),

Tested on TYPO3 CMS 7.6-dev (git revision 2692580)

Actions #1

Updated by Felix Rauch over 8 years ago

Small update: There is an example for this in the TYPO3 CMS core, namely the "sys_category" record. When a new sys_category is created, it is not possible to select a parent. OTOH, when editing a sys_category that has had a parent set, the tree works properly.

Actions #2

Updated by Felix Rauch over 8 years ago

  • % Done changed from 0 to 100

Can be closed, has been fixed.

(Merged) review: https://review.typo3.org/44356

Actions #3

Updated by Daniel Goerz over 8 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF