Bug #90936
closedEpic #89797: HrefLang / Canonical issues
Parameters got Cached in hreflang-tags
0%
Description
There is a strange behavior with hreflang-Tags.
If I clear the cache and then open a page in incognito mode like:
url.de/?strange_parameter=nonsense
than this parameter is cached for all users on that page within the hreflang-tags even if the page is called without any parameters.
But only in hreflang or canonical tag.
In this screenshot i have called the page without any parameter.
Files
Updated by Andreas Kießling over 4 years ago
You might want to check out https://extensions.typo3.org/extension/urlguard
I could not get that to work properly without this extension
Updated by Georg Ringer about 4 years ago
- Related to Epic #89797: HrefLang / Canonical issues added
Updated by Richard Haeser almost 4 years ago
- Status changed from Accepted to Closed
For hreflang and canonicalisation we use the settings for the cHash calculation. If it is important enough to use it to calculate a cHash, it seems to be a URL with unique content and so, the parameters will be applied. For that reason, it is really important to configure the cHash calculation correctly. See https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/CachingFramework/Index.html. You have several options to exclude or whitelist the options for cHash calculation. All those options are in $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash'].
Personally I do like the $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['cachedParametersWhiteList'] option and only include parameters that are important for that site. It will prevent wrong URL's, but it is also a dangerous option as it might cache a detail page with the wrong article if you not add the plugin parameters to this whitelist. But with these options, the right links are generated.