Open seirerman opened 2 years ago
Hey,
thanks for your report.
Is it possible that you still have config.linkVars = L
included?
No, config.linkVars
isn't set.
We are on TYPO3 9.5, btw...
Hey @seirerman ,
I think this is a bug in TYPO3 Core... maybe this might be related? https://review.typo3.org/c/Packages/TYPO3.CMS/+/72801
I applied the patch to TYPO3 9.5, but it didn't change anything.
I also rechecked the recommendations for when to use trusted_url_params, and I think the affected site will be fine without the extension, for now. Might be different for others, though.
@seirerman What is your setting (if any) for $GLOBALS['TYPO3_CONF_VARS']['FE']['additionalCanonicalizedUrlParameters']
?
It's empty. $GLOBALS['TYPO3_CONF_VARS']['FE']['additionalCanonicalizedUrlParameters']
isn't set.
The problem is imho that the 'L' parameter is set in AbstractMenuContentObject
in prepareMenuItemsForLanguageMenu
if ($this->conf['addQueryString']) {
$getVars = $this->parent_cObj->getQueryArguments(
$this->conf['addQueryString.'],
['L' => $sUid],
true
);
$this->analyzeCacheHashRequirements($getVars);
} else {
$getVars = '&L=' . $sUid;
}
so it seems related to the linked core patch.
The Argument $overruleQueryArguments holds the language parameter in those cases. So a possible fix is to check for it and include it again. It might be the case that its only needed for the ContentObjectRender9.
After installing trusted_url_params I noticed that the language menu on one of my sites was off. The link to the default language version of a site allways had the prefix of the second language in the URL. This resulted in not being able to return to the default language via the menu once you are on a translated page.
So I deinstalled trusted_url_params, and the language menu was working again.
To better illustrate this:
If you were on www.domain.com/it/ the link back to the german version was /it/, as well as the link to the italian version. The link to the english version was fine, though. If you were on www.domain.com/en/ the link back to the german version was /en/.
This is the TypoScript of my language menu: