Bug #86935
closed
Cannot fetch 404 page with simple base
Added by Mathias Brodala almost 6 years ago.
Updated over 3 years ago.
Category:
Site Handling, Site Sets & Routing
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 to Task #87073: Optimize error message of handlePageError() added
Problem still exists in 9.5.3
Problem still exists in 9.5.3 - i can confirm.
Workaround: Just point to your 404 page by URL, this works.
Benjamin Schmidt wrote:
Problem still exists in 9.5.3 - i can confirm.
Workaround: Just point to your 404 page by URL, this works.
and how do you do this?
(TYPO3 9.5.4)
Christian Hackl wrote:
Benjamin Schmidt wrote:
Problem still exists in 9.5.3 - i can confirm.
Workaround: Just point to your 404 page by URL, this works.
and how do you do this?
(TYPO3 9.5.4)
Use a full URL like https://example.org/404
and use environment variables if necessary.
Mathias Brodala wrote:
Christian Hackl wrote:
Benjamin Schmidt wrote:
Problem still exists in 9.5.3 - i can confirm.
Workaround: Just point to your 404 page by URL, this works.
and how do you do this?
(TYPO3 9.5.4)
Use a full URL like https://example.org/404
and use environment variables if necessary.
Ah thanks
The Problem still exists in 9.5.5
Just point to your 404 page by URL
This don't work for me?
Okay, the problem is, I protected the website width htacess password. Without the protection the solution with the url works.
Riccardo De Contardi wrote:
Are these issues related?
#86616
#86260
Yes, sounds like, please mark them accordingly.
- Related to Bug #86616: Content of 404 page is not shown added
- Related to Bug #86260: Site error handling: Show content from page with / entry point added
Is it also possible to show 404 pages for different languages using the absolute url trick?
- Status changed from New to Under Review
- Target version changed from next-patchlevel to Candidate for patchlevel
- Related to Feature #88361: Site error handling: "Show content from page" for 404 should render page directly added
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF