Issue Bug Closed

#82843TCA: localized `SelectSingleElement` selects wrong option

Romain Canon 10/23/17, 14:02 updated 04/01/20, 21:14

Description

When working with a single select field in the form engine, with its localization mode setting set to defaultAsReadonly, the selected value from the localized children elements will not be correct.

With the following TCA configuration:

'event' => [
    'label' => "Select Single Element",
    'l10n_mode' => 'exclude',
    'l10n_display' => 'defaultAsReadonly',
    'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'items' => [
            ['Label A', 'A'],
            ['Label B', 'B'],
        ],
    ],
],

I get the following rendering:

!select-single-element-01.png!
_Root element_

!select-single-element-02.png!
_Translated element_

In the translated element, the selected value should be Label B.

Reviews 3