Actions
Bug #77257
closedStory #69617: FormEngine bugs
The selection of a selectbox with the l10n_display type of defaultAsReadonly in TCA is wrong for a localized record
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
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' ) )
Actions