Project

General

Profile

Actions

Bug #47422

closed

Unselectable items with renderMode=tree

Added by Nicolas Forgeot over 11 years ago. Updated over 11 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2011-11-07
Due date:
% Done:

0%

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

Description

In Short: Using a select with renderMode=tree in TCA and maxitems=1 can become impossible when the referenced entry gets deleted.

I have a database table which contains a select with renderMode=tree, which references the pages table. You can select exactly one page):

'page' => array(
    'exclude' => 0,
    'label' => 'Page',
    'config' => array(
        'type' => 'select',
        'foreign_table' => 'pages',
        'foreign_table_where' => 'ORDER BY sorting ASC',
        'minitems' => 1,
        'maxitems' => 1,
        'renderMode' => 'tree',
        'treeConfig' => array(
            'parentField' => 'pid',
            'appearance' => array(
                'expandAll' => false,
                'maxLevels' => 999,
            ),
        ),
    ),
),

The page tree is rendered beautiful and I like this new feature :)

I ignored the bad usability with maxitems 1: When one item is selected, you can't click on another item to select it. You have to unselect the selected item first.

But this exact usability defect leads to the bug, that you cannot select anything:
- Select a page, save the record
- Go to the page tree and delete the page
- Come back to the record and try to select another page

It's impossible to select another page, because the widget has remembered, that it already has a page selected and that you have to unselect it first. This is now impossible because the page does not appear in the tree and the widget is completly unusable.

Actions

Also available in: Atom PDF