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 #1

Updated by Francois Suter almost 5 years ago

It's more complicated than this, because the language is gotten from the request and not from the site, so we have the wrong URL base...

I'll keep digging because I still feel like it should be possible to have cross-domain linking at this place like in the rest of TYPO3.

Actions #2

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62955

Actions #3

Updated by Gerrit Code Review almost 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62955

Actions #4

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62955

Actions #5

Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62955

Actions #6

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63465

Actions #7

Updated by Anonymous over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions #9

Updated by Christian Eßl over 4 years ago

  • Related to Bug #91013: Site Error Handling does not respect disabled SiteLanguages added
Actions

Also available in: Atom PDF