Bug #76785
closedWrong Selected option in localised TCA columns of type select when l10n_mode="exclude"
100%
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
Updated by Andreas Krämer over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Benni Mack over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a8913dbe2fcf9676153d4036acde7df4cd12681b.
Updated by Gerrit Code Review over 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
Updated by Benni Mack over 4 years ago
- Status changed from Under Review to Resolved
Applied in changeset ae8172cef8ed304dea48c2b1facf54a03ec87206.