diff --git a/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php b/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php index 296f2b78969599b8e61f66e19f1b1304514c44ab..6625bbb69ea6032952881652c68ce43ee2157121 100644 --- a/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php +++ b/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php @@ -207,9 +207,14 @@ class PageArgumentValidator implements MiddlewareInterface, LoggerAwareInterface return $this->evaluateQueryParametersWithoutCacheHash($pageArguments->getDynamicArguments(), $pageNotFoundOnCacheHashError); } $relevantParameters = $this->getRelevantParametersForCacheHashCalculation($pageArguments); + // There are no parameters that require a cHash. + // We end up here when the site was called with an `id` param, e.g. https://example.org/index?id=123. + if (empty($relevantParameters)) { + return true; + } // There are parameters that would be needed for the current page, but no cHash is given. // Thus, a "page not found" error is thrown - as configured via "pageNotFoundOnCHashError". - if (!empty($relevantParameters) && $pageNotFoundOnCacheHashError) { + if ($pageNotFoundOnCacheHashError) { return false; } // Caching is disabled now (but no 404)