Project

General

Profile

Actions

Bug #80400

closed

TYPO3\CMS\Backend\Utility::getItemLabel does not return a label, if label_alt is used in TCA

Added by Viktor Leonhardt about 7 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2017-03-22
Due date:
% Done:

60%

Estimated time:
1.00 h
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

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

BackendUtility.php.patch (1.02 KB) BackendUtility.php.patch Viktor Leonhardt, 2017-03-22 16:38
DatabaseRecordList.php.patch (1 KB) DatabaseRecordList.php.patch Viktor Leonhardt, 2017-03-22 16:38
Actions #1

Updated by Viktor Leonhardt about 7 years ago

I forgot to mention, I used comma separated columns. The Typo3 version is 7.6.15.

Actions #2

Updated by Michael Blunck almost 7 years ago

i try to fix it

Actions #3

Updated by Christian Eßl about 4 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.

Actions #4

Updated by Benni Mack about 4 years ago

  • Status changed from New to Needs Feedback
Actions #5

Updated by Christian Kuhn about 2 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.

Actions

Also available in: Atom PDF