#105840TYPO3_CONF_VARS additionalCanonicalizedUrlParameters not functional
Description
$GLOBALS[‘TYPO3_CONF_VARS’][‘FE’][‘additionalCanonicalizedUrlParameters’][] as described in https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ApiOverview/Seo/CanonicalApi.html is not functional.
My argument “?tx_fmdreferences_reference%5Bcategory%5D=5” written as ‘tx_fmdreferences_reference[category]’ in this configuration is ignored and still used in the canonical tag.
return array_diff($paramsToExclude, $additionalCanonicalizedUrlParameters);
does remove the parameters from $additionalCanonicalizedUrlParameters.I changed the code to
return array_unique(array_merge($paramsToExclude, $additionalCanonicalizedUrlParameters));
what now seems to work. As I have seen the method in TYPO3 v12 is still the same, so its the same fault.Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 1
-
Oliver Bartsch commented and changed status
NewClosed <span data-processor="relativetime" data-value="2024-12-18T09:10:17+00:00" > 12/18/24, 09:10 </span>
Hi thanks for coming up with this. Actually at this point, it looks that the linked documentation is wrong. The description of the setting as well as the corresponding code places definitely use the setting to add those parameters instead of excluding them. I therefore moved this to the corresponding docs issue tracker https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/issues/5152 and will close this ticket.