Project

General

Profile

Actions

Bug #90936

closed

Epic #89797: HrefLang / Canonical issues

Parameters got Cached in hreflang-tags

Added by Thomas Anders about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Category:
SEO
Target version:
-
Start date:
2020-04-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

strange_param_in_hraflang.png (64 KB) strange_param_in_hraflang.png Thomas Anders, 2020-04-02 21:01
Actions #1

Updated by Andreas Kiessling about 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

Actions #2

Updated by Richard Haeser about 4 years ago

  • Category changed from Caching to SEO
Actions #3

Updated by Georg Ringer over 3 years ago

  • Status changed from New to Accepted
Actions #4

Updated by Georg Ringer over 3 years ago

  • Related to Epic #89797: HrefLang / Canonical issues added
Actions #5

Updated by Richard Haeser over 3 years ago

  • Parent task set to #89797
Actions #6

Updated by Richard Haeser over 3 years ago

  • Assignee set to Richard Haeser
Actions #7

Updated by Richard Haeser over 3 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.

Actions

Also available in: Atom PDF