Bug #90135
closedGet correct site in PageContentErrorHandler
100%
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.