Bug #78653
closedLink handler expand page function ignores 'label' and 'label_alt' settings for tt_content
0%
Description
I'm using an 3rd party extension (fluidcontent) that offers the "subheader" field as the title. The correct titles are showing up in the "List" module, but if an editor would like to pick a link to a content element on a page those content elements have "[No title]" and it is impossible to identify them correctly.
I debuged the code and find the following DB select in the /typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php
Lines 177-185:
// Look up tt_content elements from the expanded page:
$res = $db->exec_SELECTquery(
'uid,header,hidden,starttime,endtime,fe_group,CType,colPos,bodytext',
'tt_content',
'pid=' . (int)$expPageId . BackendUtility::deleteClause('tt_content')
. BackendUtility::versioningPlaceholderClause('tt_content'),
'',
'colPos,sorting'
);
This limits the search only for the "header". This value is set through $GLOBALS['TCA']['tt_content']['ctrl']['label'] and could be change anytime. (The default value for $GLOBALS['TCA']['tt_content']]['ctrl']['label_alt'] is 'subheader,bodytext' -> so if it would be selected in the query up there, the list should work.)
On the line 205 there is a reference to:
BackendUtility::getRecordTitle('tt_content', $row, true)
This function checked both settings up there, so I think, that the query should respect both settings by the select, and return those values also.