Project

General

Profile

Actions

Bug #95586

closed

PageNotFound handling doesn't work in debug mode

Added by Sascha Wilking about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Frontend
Target version:
Start date:
2021-10-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

If debug mode is enabled, the page not found handler throws an exception:

Error handler could not fetch error page "http://localhost/404", reason: PHP Warning: Undefined property: GuzzleHttp\Psr7\Response::$getStatusCode in /private/typo3/sysext/core/Classes/Error/PageErrorHandler/PageContentErrorHandler.php line 147

Settings in SiteConfiguration:
errorCode = 404
errorHandler: Show content from page

To fix it:
Use "if ($response->getStatusCode() === 200)" instead of "if ($response->getStatusCode === 200)"


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #94402: Don't issue second HTTP request for error handlingClosed2021-06-23

Actions
Related to TYPO3 Core - Bug #95940: Error on random urls which should show 404 pageClosed2021-11-10

Actions
Actions

Also available in: Atom PDF