Project

General

Profile

Actions

Bug #93368

open

Domain redirects to records not working anymore

Added by Mathias Brodala about 3 years ago. Updated 2 months ago.

Status:
Needs Feedback
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2021-01-26
Due date:
% Done:

0%

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

Description

Given domain redirects to records when a domain for such a redirect is requested a 404 error is triggered instead of a redirect.

Criteria to trigger this behavior:

  1. The base of all sites must be a full URL like http://example.org/, not simply / (slash).
  2. The incoming domain must not be the base of any site.
  3. The redirect must point to a record URN like t3://record?identifier=<identifier>&uid=<uid>. (There's an automatic fallback in case of t3://page URNs.)

The incoming domain does not match the base of any site which is why a NullSite is used instead while matching redirects. Due to this TypoScriptFrontendController::getPageAndRootline() (called from RedirectService::bootFrontendController()) triggers an immediate 404 response. This prevents the record URN to be resolved to a valid URL.

As a workaround one can override RedirectService::getTargetUrl() and fall back to any valid site.

Actions #1

Updated by Mathias Brodala about 3 years ago

  • Subject changed from Domain redirects not working anymore to Domain redirects to records not working anymore
Actions #2

Updated by Oliver Hader over 1 year ago

  • Sprint Focus set to On Location Sprint
Actions #3

Updated by Susanne Moog over 1 year ago

I'm a little confused as to how this is supposed to work. The record link handler could belong to multiple sites (with multiple different target page ids) - how should the correct redirect target be determined? As far as I understand, this will not work with the record link handler, and would require a page id set (and therefor a custom link handler that supports it).

Actions #4

Updated by Benni Mack about 1 year ago

  • Status changed from New to Needs Feedback

Question is still valid

Actions #5

Updated by Benni Mack 9 months ago

  • Sprint Focus deleted (On Location Sprint)
Actions #6

Updated by Mathias Brodala 2 months ago

One would need to resolve the record URL at least until the link parameter is known. Then the site could be looked up.

However, one may need a site, its related root page and the related TypoScript setup to resolve said parameter.

I fear this is a chicken-egg problem which cannot be resolved easily.

Actions #7

Updated by Benni Mack 2 months ago

We might be able to fix this behaviour in v13 with the resolving of TypoScript and TSFE

Actions

Also available in: Atom PDF