Issue Bug Closed

#98079No localized records will be rendered in custom record link handlers

Marcel Marty 08/05/22, 09:20 updated 04/02/25, 08:46

Description

Since TYPO3 11.5.5, no localized records in custom record link handlers are displayed.

Steps to reproduce:

  1. Create a TYPO3 installation with 2 languages (in my case default is DE and the other language is FR)
  2. Create a basic extension which is creating records
  3. Create a record and localize this record to FR.
  4. 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
  5. Create a content element in the default language with an RTE field and some text
  6. Localize the content element from 2)
  7. Link to a specified record by the previously generated custom record link handler in the default language
  8. 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).

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.