Bug #105266
openSitemap Cache Bug on missing chash
0%
Description
When Caching the Sitemap, get-Params seem to be ignored if no cHash is given. Which can result in a wrong Sitemap rendered.
1. Clear the Cache
2. Call a Subpage of your Sitemap without chash e.g. /sitemap.xml?sitemap=pages or ?type=1533906435&sitemap=pages (without RouteEnhancer)
3. Call the Sitemaps Index Page (/sitemap.xml or ?type=1533906435)
-> The Subpage will be shown instead of the Index-Page
Only tested in TYPO3 12
Updated by Moritz Ngo about 1 month ago
I could confirm this behavior in several different TYPO3 CMS installations.
I'm not sure if this issue is related to EXT:seo's XML sitemap or even larger to the general page rendering. I haven't enough time to investigate any further but to reproduce this behavior.
Updated by Garvin Hicking about 1 month ago
- Category set to Site Handling, Site Sets & Routing
(Setting a category; unsure if it's right, but maybe Routijg fits better than ext:seo?)
Updated by Andreas Gröf about 1 month ago
Now I had a bit of time investigating.
The Problem is, that queryParams are ignored in Caching, when no cHash is given.
But im not sure what should be the correct behavior.
vendor/typo3/cms-frontend/Classes/Controller/TypoScriptFrontendController.php Line 1130
protected function getRelevantParametersForCachingFromPageArguments(PageArguments $pageArguments): array
{
$queryParams = $pageArguments->getDynamicArguments();
if (!empty($queryParams) && ($pageArguments->getArguments()['cHash'] ?? false)) {
$queryParams['id'] = $pageArguments->getPageId();
return GeneralUtility::makeInstance(CacheHashCalculator::class)
->getRelevantParameters(HttpUtility::buildQueryString($queryParams));
}
return [];
}