Bug #80400
closedTYPO3\CMS\Backend\Utility::getItemLabel does not return a label, if label_alt is used in TCA
60%
Description
The function TYPO3\CMS\Backend\Utility\BackendUtility::getItemLabel does not return a label if label_alt is set in the TCA. This can be solved, if the passed column name is split by ',' and then returns an array of labels. Next, the function TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::renderListHeader should be able to process an array instead of a single string.
Attached are two Patches, which solve this behavior.
Files
Updated by Viktor Leonhardt over 7 years ago
I forgot to mention, I used comma separated columns. The Typo3 version is 7.6.15.
Updated by Christian Eßl almost 5 years ago
In what scenario would BackendUtility::getItemLabel() receive a label_alt instead of the label?
In the DatabaseRecordList it looks like it would always receive the "label" instead of "label_alt". So I can't see the problem here?
"label_alt" in TCA can be multiple fields at once.
"label" in TCA must always be a single field.
Updated by Benni Mack over 4 years ago
- Status changed from New to Needs Feedback
Updated by Christian Kuhn almost 3 years ago
- Status changed from Needs Feedback to Closed
hey. i hope it's ok to close here for now: the usecase seems odd, or maybe a misunderstanding of the tca-ctrl fields. in case we missed something here, we should probably restart with a fresh issue.