Bug #86935

Cannot fetch 404 page with simple base

Added by Mathias Brodala 28 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
Start date:
2018-11-15
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you set up the errorHandling in a site configuration to use the errorHandler: Page and a dedicated page as errorContentSource this page cannot be displayed if you use a base without a full URL like / or /en/ (for language variants)

The following error is displayed as HTML response in this case:

Error handler could not fetch error page: Possible recursion detected.

There are many problems with this error message itself:

  • It does not contain the internally resolved URL
  • It does not contain the exact error message which occurred

In this very case a errorContentSource like t3://page?uid=10 is resolved to /404 (if that's the slug of the 404 page) by the PageContentErrorHandler. Then GeneralUtility::getUrl() tries to load this as a file called /404 in the filesystem of the web server since the resolved URL does not contain a scheme and host. At least this additional error could be avoided by using the RequestFactory directly.

The error itself should be fixed by prepending the current scheme and host in case the resolved URL is not a full URL. The PageContentErrorHandler only supports pages and full URLs anyways. This could make it necessary to add an additional StaticFileErrorHandler to cover cases where displaying content of a static file really was intended.


Related issues

Related to TYPO3 Core - Task #87073: Optimize error message of handlePageError() Resolved 2018-12-04

History

#1 Updated by Peter Kraume 9 days ago

  • Related to Task #87073: Optimize error message of handlePageError() added

Also available in: Atom PDF