Project

General

Profile

Actions

Bug #77257

closed

Story #69617: FormEngine bugs

The selection of a selectbox with the l10n_display type of defaultAsReadonly in TCA is wrong for a localized record

Added by M. Stichweh over 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2016-07-26
Due date:
% Done:

0%

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

Description

If a non-translatable selectbox is rendered within a localized record with defaultAsReadonly type for l10n_display only the first character of the selected uid is used to set the selected value. The problem is in line 95 of the SelectSingleElement class:

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

An array is expected here but in this case, a localized item with a non-translatable select field, the value of itemFormElValue is a string.

Here is an example for the TCA config:

'foo' => array(
  'l10n_mode' => 'exclude',
  'l10n_display' => 'defaultAsReadonly',
  'config' => array(
    'type' => 'select',
    'renderType' => 'selectSingle',
    'foreign_table' => 'tx_example_domain_model_foo'
  )
)

Related issues 5 (1 open4 closed)

Related to TYPO3 Core - Bug #77155: PHP Warning: Invalid argument supplied for foreach() in backend/Classes/Form/Element/SelectMultipleSideBySideElement.php line 66ClosedChristian Kuhn2016-07-19

Actions
Related to TYPO3 Core - Bug #84997: Localized records with rendertype selectCheckBox + defaultAsReadonly generate PHP warningsClosed2018-05-14

Actions
Related to TYPO3 Core - Bug #82843: TCA: localized `SelectSingleElement` selects wrong optionClosed2017-10-23

Actions
Related to TYPO3 Core - Bug #81996: Read ony select field 'renderType' => 'selectSingle' renders all available itemsNew2017-07-28

Actions
Is duplicate of TYPO3 Core - Bug #76785: Wrong Selected option in localised TCA columns of type select when l10n_mode="exclude"Closed2016-06-24

Actions
Actions

Also available in: Atom PDF