Actions
Bug #70081
closedmaxitems = 1 and e.g. category tree results in invalid itemFormElValue in SelectTreeElement
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