Project

General

Profile

Actions

Bug #90135

closed

Get correct site in PageContentErrorHandler

Added by Francois Suter almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Start date:
2020-01-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

The \TYPO3\CMS\Core\Error\PageErrorHandler\PageContentErrorHandler class accepts the "errorContentSource" property for defining a URL to point to when an error occurs. This URL can either be a fully-formed URI or a link in TYPO3 internal syntax (i.e. t3://page?uid=xxx).

When trying to build the URL based on the latter, the \TYPO3\CMS\Core\Error\PageErrorHandler\PageContentErrorHandler first tries to get the site information from the current request. If that fails, it tries to get the site by using the uid given in the "t3" syntax.

This is an issue in a particular case: a multi-site setup with a central error page. In this case, the site should be retrieved first using the given uid and fall back on the current site.

I think that this behaviour makes a lot more sense in general, since the uid given may not belong the current site anyway. It seems safer to take the page uid as a reference and fall back on the current site.

The setup to reproduce this error is a TYPO3 installation with at least two sites. The error page for the second site points to a page in the first site.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91013: Site Error Handling does not respect disabled SiteLanguagesClosed2020-04-13

Actions
Actions

Also available in: Atom PDF