Project

General

Profile

Actions

Bug #98079

open

No localized records will be rendered in custom record link handlers

Added by Marcel Marty almost 2 years ago. Updated about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & 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:

  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).


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Story #101565: Frontend related translation issuesNew2023-08-03

Actions
Related to TYPO3 Core - Bug #101718: DatabaseRecordLinkBuilder does not respect language setting for all languages (sys_language_uid = -1)Resolved2023-08-21

Actions
Blocked by TYPO3 Core - Bug #87260: Untranslated records should not be linkedClosedMathias Brodala2018-12-21

Actions
Actions

Also available in: Atom PDF