Bug #101156


Record links with L>0 records resolve to page URLs with L=0 in redirect context

Added by Stefan P about 1 year ago. Updated about 1 year ago.

Should have
Redirect Handling
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


Having a setup like this:

domain/de is L=0
domain/en is L=1

Having a redirect source domain/shortcut (note: no given language context) with target t3://record?identifier=whatever&uid=123 with a uid 123 from L=1!

This leads to domain/de/detail-page/english-record, which is wrong ( de page with en record). The requested record is correctly fetched and overlayed, but displayed on the wrong site language (which usally is a 404).
In the time of the redirect middleware execution the request has no SiteLanguage attribute set, but the RouteResult attribute already has one (to L=0, whyever this is assumed, I suspect this to be the cause of the problem, but changing the RouteResult language in a custom Middleware is forbidden by an explicit Exception).

Adding the L=1 parameter explicitly to the target link (t3://record?...&L=1) does not change anything, it gets ignored.

Expected behaviour 1: as long as no explicit language is present, a RecordLink should use the language from the record also for the page resolving (let L follow from record.sys_language_uid, instead of just assuming L=0)

Expected behaviour 2: When passing an explicit L to a record link it should be respected by the page resolving, just how it is like adding L to a t3://page?uid=123&L=1 link.

I assume this is also valid when not being in redirect context, but for example in command context, where also no language context is present.

Discovered in v11, probbaly valid in all others as well.

Our current workaround is to always force-append the L parameter in record link configuration,see below. But this should not be needed, but happen implicitly.

config.recordLinks.whatever {
  typolink {
    additionalParams {
       cObject {
         1 = TEXT
         1 {
           data = field:sys_language_uid
           wrap = &L=|

         2 = TEXT
         2 {
           data = field:uid
           wrap = tx_foo_the_usualstuff&tx_foo_record[uid]=|

Related issues 2 (1 open1 closed)

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

Related to TYPO3 Core - Bug #99797: Redirects don't respect current languageClosedStefan Bürk2023-02-02

Actions #1

Updated by Stefan P about 1 year ago

Just discovered that record links never change the site language at all. Even in regular FE context: be on any regular page in any language (let's say L=3), where a t3://record link is rendered. If this record is a record from L=5, then we get a link to page L=3 with record from L=5, which is basically the same bug.

So, record links should always override the global L to the sys_language_uid of the chosen record.

Actions #2

Updated by Eric Harrer 12 months ago

  • Related to Epic #101557: Translation Handling Findings added
Actions #3

Updated by Jo Hasenau 12 months ago

  • Related to deleted (Epic #101557: Translation Handling Findings)
Actions #4

Updated by Astrid Haubold 9 months ago

  • Related to Story #101565: Frontend related translation issues added
Actions #5

Updated by Peter Kraume 8 months ago

  • Related to Bug #99797: Redirects don't respect current language added

Also available in: Atom PDF