Bug #86935
closedCannot fetch 404 page with simple base
100%
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.
Updated by Peter Kraume almost 6 years ago
- Related to Task #87073: Optimize error message of handlePageError() added
Updated by Benjamin Schmidt almost 6 years ago
Problem still exists in 9.5.3 - i can confirm.
Workaround: Just point to your 404 page by URL, this works.
Updated by Christian Hackl over 5 years ago
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)
Updated by Mathias Brodala over 5 years ago
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.
Updated by Christian Hackl over 5 years ago
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
Updated by Niklas Lazinbee over 5 years ago
The Problem still exists in 9.5.5
Just point to your 404 page by URL
This don't work for me?
Updated by Attila Glück over 5 years ago
hi, you must set a full base url in config.yaml https://domain.com/ than works.
Updated by Niklas Lazinbee over 5 years ago
Okay, the problem is, I protected the website width htacess password. Without the protection the solution with the url works.
Updated by Riccardo De Contardi over 5 years ago
Updated by Mathias Brodala over 5 years ago
Updated by Riccardo De Contardi over 5 years ago
- Related to Bug #86616: Content of 404 page is not shown added
Updated by Riccardo De Contardi over 5 years ago
- Related to Bug #86260: Site error handling: Show content from page with / entry point added
Updated by Alexander Grein over 5 years ago
Is it also possible to show 404 pages for different languages using the absolute url trick?
Updated by Gerrit Code Review over 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/+/60630
Updated by Gerrit Code Review over 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/+/60630
Updated by Gerrit Code Review over 5 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/+/60630
Updated by Gerrit Code Review over 5 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/+/60630
Updated by Benni Mack over 5 years ago
- Target version changed from next-patchlevel to Candidate for patchlevel
Updated by Stefan Neufeind over 5 years ago
- Related to Feature #88361: Site error handling: "Show content from page" for 404 should render page directly added
Updated by Gerrit Code Review over 5 years ago
Patch set 5 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/+/60630
Updated by Gerrit Code Review over 5 years ago
Patch set 6 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/+/60630
Updated by Gerrit Code Review over 5 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/+/60873
Updated by Andreas Fernandez over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c4a144e6c2d3c2e5c457290ca36fd3331a6d6c77.
Updated by Benni Mack almost 5 years ago
- Status changed from Resolved to Closed
Updated by Martin Hotmann about 4 years ago
Andreas Fernandez wrote in #note-24:
Applied in changeset c4a144e6c2d3c2e5c457290ca36fd3331a6d6c77.
Same Bug in TYPO3 v10.4.9 for me right now
Updated by Mathias Brodala about 4 years ago
Martin Hotmann wrote in #note-26:
Andreas Fernandez wrote in #note-24:
Applied in changeset c4a144e6c2d3c2e5c457290ca36fd3331a6d6c77.
Same Bug in TYPO3 v10.4.9 for me right now
You can avoid the issue (and considerably increase performance) by installing the pixelant/pxa-lpeh package. This turns the 404 handling into a completely internal request.