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 almost 8 years ago. Updated about 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 #1

Updated by Andreas Krämer about 5 years ago

  • Has duplicate Bug #77257: The selection of a selectbox with the l10n_display type of defaultAsReadonly in TCA is wrong for a localized record added
Actions #2

Updated by Gerrit Code Review about 4 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/63722

Actions #3

Updated by Gerrit Code Review about 4 years ago

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

Actions #4

Updated by Benni Mack about 4 years ago

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

Updated by Gerrit Code Review about 4 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63977

Actions #6

Updated by Benni Mack about 4 years ago

  • Status changed from Under Review to Resolved
Actions #7

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF