#101204Error handling for unknown type parameter
Description
I configured error handling in my site config to show page content from the page tree but when I call the page with an unknown type parameter (?type=12345) the default TYPO3 error page is shown.
I looked into the code and found that the TypoScriptFrontendController calls ErrorController->internalErrorAction (line 1860).
The internalErrorAction calls the funtion isPageUnavailableHandlerConfigured (line 52) but this function only checks the devIPmask which is a bit strange according to function name and the required steps to do at this point.
/**
* Checks whether the devIPMask matches the current visitor's IP address.
* Note: the name of this method is a misnomer (legacy code),
*
* @return bool True if the server error handler should be used.
*/
protected function isPageUnavailableHandlerConfigured(): bool
{
return !GeneralUtility::cmpIP(GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']);
}
When I comment out this check the page from the page tree is properly shown.
Could maybe someone look into the code and check the usage of isPageUnavailableHandlerConfigured() at this point? If all is as intended I would like to know how to setup custom error page content for this use case.
Thank you.
Reviews 1
History 56
-
Georg Ringer changed Sprint Focus On Location Sprint 07/09/24, 16:23
-
Garvin Hicking changed category 07/31/24, 10:55
-
Gerrit Code Review pushed patch set 1 for main to change 90293 status
NewUnder Review 08/08/25, 08:25 -
Friedemann Altrock commented 08/08/25, 08:31
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % 08/11/25, 07:40Applied in changeset commit:e94d390e01bd4a2f32f4e7a5542714c530af6a58.
-
Benni Mack changed status
ResolvedClosed 12/02/25, 14:33
This is not a bug. You are likely seeing the error stack trace because your system is configured in debug mode, where the
devIPmaskis*.To clarify this behaviour, I have proposed a rename of the internal method.