Actions
Bug #98079
openNo localized records will be rendered in custom record link handlers
Status:
New
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
Start date:
2022-08-05
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Since TYPO3 11.5.5, no localized records in custom record link handlers are displayed.
Steps to reproduce:¶
- Create a TYPO3 installation with 2 languages (in my case default is DE and the other language is FR)
- Create a basic extension which is creating records
- Create a record and localize this record to FR.
- Create a custom link handler as described in the official documentation at https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/LinkBrowser/Linkhandler/Index.html
- Create a content element in the default language with an RTE field and some text
- Localize the content element from 2)
- Link to a specified record by the previously generated custom record link handler in the default language
- Link to the localized version of a specified record in the localized content element from 3)
Conclusion:¶
The link in the default language will appear in the frontent, the link in the localized content element will not.
Suggestion:¶
The problem will be caused because of an incomplete condition in typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php file (line 66-68, change for #87260).
In my opinion the condition should be:
if (empty($overlay['_LOCALIZED_UID']) && empty($overlay['l10n_parent'])) {
$record = 0;
}
instead of
if (empty($overlay['_LOCALIZED_UID'])) {
$record = 0;
}
because the property _LOCALIZED_UID is not available in Extbase records (I have just l10n_parent there).
Actions