TypoScript objects CONTENT and RECORDS do not respect localization of table pages
Imagine someone wants to display the localized title of a page in FE by the RECORDS object in TypoScript - example:
temp.pageTitle = RECORDS
source = pages_123
tables = pages
conf.pages < lib.whatever
In tslib_cObj there's a call to $GLOBALS['TSFE']->sys_page->getRecordOverlay() which won't work for pages, since pages have an own table for localization stuff - thus getPageOverlay() would be correct for the table 'pages' in the RECORDS and CONTENT TS-object...Further reasons:
- pages don't have [ctrl][languageField]
- missing the check and handling for [ctrl][transForeignTable]
(issue imported from #M9275)
Updated by Martin Keck over 11 years ago
I'm not quite sure about it, but I think the patch has a small bug, too.
After patching class.t3lib_page.php the localized output from a RECORDS object worked fine, but the default language output (in my case German) didn't work anymore.
The reason for that behaviour seems to be the check for sys_language_overlay mode in lines 376 ff of the patch. As I use "hideNonTranslated" the $row was completeley reseted, even if the default language was used.
Uncommenting line 377 "unset($row);" did solve the problem for me, but that's actually just a fast hack. Anyone a better solution?
Thx and greets,