Project

General

Profile

Actions

Bug #70081

closed

maxitems = 1 and e.g. category tree results in invalid itemFormElValue in SelectTreeElement

Added by Andreas Allacher over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2015-09-24
Due date:
% Done:

100%

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

Description

In \TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems there is the following code:

        // For single select fields we just keep the current value because the renderer
        // will take care of showing the "Invalid value" text.
        // For maxitems=1 select fields is is also possible to select empty values.
        // @todo: move handling of invalid values to this data provider.
        if ($fieldConfig['config']['maxitems'] === 1) {
            return array($result['databaseRow'][$fieldName]);
        }

However, that is actually invalid becasue even if I have maxitems === 1 I can still use MM relations like for categories which would then need to be resolved.
We need to check for MM table here.

Furthermore I think this issue is actually related:
https://forge.typo3.org/issues/69836

Becasue that way 0 was returned instead of "parsed" but once an item is stored it would always be "1" as the field only contains the count.

Actions #1

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43531

Actions #2

Updated by Benni Mack over 8 years ago

  • Sprint Focus set to Stabilization Sprint
Actions #3

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43531

Actions #4

Updated by Gerrit Code Review over 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43531

Actions #5

Updated by Gerrit Code Review over 8 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43531

Actions #6

Updated by Andreas Allacher over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF