Bug #101156
openRecord links with L>0 records resolve to page URLs with L=0 in redirect context
0%
Description
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]=| } } } } }