Project

General

Profile

Actions

Bug #76785

closed

Wrong Selected option in localised TCA columns of type select when l10n_mode="exclude"

Added by Jeffrey Nellissen over 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2016-06-24
Due date:
% Done:

100%

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

Description

If l10n_mode is set to exclude, the selected field in localised elements is wrong.
In this case the variable $parameterArray['itemFormElValue'] seems to be a string, not an array as expected in SelectSingleElement.php
In fact T3 will take only the first letter as related uid for translated record
aE Default Element has a relation to an element with uid 37, select field of translated record will shown the element with the uid 3 as selected option

Workaround for me is currently:

change

        if (!empty($parameterArray['itemFormElValue'])) {
            $selectedValue = (string)$parameterArray['itemFormElValue'][0];
        }

to

       if (!empty($parameterArray['itemFormElValue'])) {
                if (is_array($parameterArray['itemFormElValue'])){
                        $selectedValue = (string)$parameterArray['itemFormElValue'][0];
                } else {
                        $selectedValue = (string)$parameterArray['itemFormElValue'];
                }
        }

in ../sysext/backend/Classes/Form/Element/SelectSingleElement.php on line 94 ff

But im wondering, if it should be better to fix this in the method, which fill the $parameterArray for exclude Elements

Best regards,
Jeffrey


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #77257: The selection of a selectbox with the l10n_display type of defaultAsReadonly in TCA is wrong for a localized recordClosed2016-07-26

Actions
Actions

Also available in: Atom PDF