Project

General

Profile

Actions

Bug #99797

open

Redirects don't respect current language

Added by Phat Hoang over 1 year ago. Updated 7 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
Category:
Redirect Handling
Target version:
-
Start date:
2023-02-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

My installation has multiple domains with different language:
my-domain.se (default)
my-domain.dk

The redirects only go to the default language.

Here are the redirect scenarios that don't work as expected:

1)
Source domain: my-domain.dk
Source path: /source-path-dk
Source target: t3://page?uid=1405

When visiting: my-domain.dk/source-path-dk
Expected redirect: my-domain.dk/dk-page
Actual redirect: my-domain.se/se-page

2)
Source domain: *
Source path: /source-path
Source target: t3://page?uid=1405

When visiting: my-domain.dk/source-path
Expected redirect: my-domain.dk/dk-page
Actual redirect: my-domain.se/se-page

The same happens when linking to records using RecordLinkHandler.

The problem seems to be in bootFrontendController in RedirectService where it instantiates TSFE where it passes the $site->getDefaultLanguage() to the "siteLanguage" parameter.

I checked the middleware TypoScriptFrontendInitialization how it creates the TypoScriptFrontendController.
It passes $request->getAttribute('language', $site->getDefaultLanguage()) to the "siteLanguage" and when I did the same change the scenarios above work as expected.


Related issues 2 (2 open0 closed)

Related to TYPO3 Core - Bug #99839: Can't append L in additionalParams when using recordLink to redirectNeeds Feedback2023-02-06

Actions
Related to TYPO3 Core - Bug #101156: Record links with L>0 records resolve to page URLs with L=0 in redirect contextNew2023-06-23

Actions
Actions

Also available in: Atom PDF