Search code examples
typo3typo3-6.2.xrealurl

TYPO3 6.2 / RealURL : 404 error with google tag in URL


On this website :

https://lessentiel.novethic.fr/blog/business-case-3/post/orpea-dialogue-de-sourds-face-a-lengagement-actionnarial-des-acteurs-de-la-finance-durable-810#scrollTop=0

Google Analytics add parameters for cross-domain-tracking to url so a working link like this one

https://www.novethic.fr/actualite/gouvernance-dentreprise/entreprises-controversees/isr-rse/les-sombres-dessous-d-orpea-ont-echappe-aux-filets-de-la-notation-rse-150534.html

become this, that lead to 404 error

https://www.novethic.fr/actualite/gouvernance-dentreprise/entreprises-controversees/isr-rse/les-sombres-dessous-d-orpea-ont-echappe-aux-filets-de-la-notation-rse-150534.html?_gl=1*1rw78bk*_ga*ODIzMDE2MTIuMTYzODE5MjUyMw..*_ga_FVLX79JNXC*MTY0NDQ4NjM1OC40OC4xLjE2NDQ0ODg2MDkuMA..#_ga=2.179165860.1898940241.1644433835-82301612.1638192523

Any tell TYPO3/ RealURL to ignore cross-domain-tracking parameters ?

_gl=11rw78bk_gaODIzMDE2MTIuMTYzODE5MjUyMw.._ga_FVLX79JNXC*MTY0NDQ4NjM1OC40OC4xLjE2NDQ0ODg2MDkuMA..#_ga=2.179165860.1898940241.1644433835-82301612.1638192523


Solution

  • Take a look into configuration what is set for the settings:

    $GLOBALS['TYPO3_CONF_VARS']['FE']['cHashExcludedParameters']
    $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError']
    

    In pageNotFoundOnCHashError you can define if the system throws a 404 when cHash parameters are not valid e.g. when a parameter was added but not handled in cHash. This is happening when an external service adds parameter like Google does in your case.

    In cHashExcludedParameters you can define the parameters that are not used to validate the cHash.

    There are 2 options now:

    1. Set pageNotFoundOnCHashError to 0 (not so good solution as there won't be a 404 when someone tries to manipulate the parameters)
    2. Add _gl to the list of cHashExcludedParameters (better solution as you whitelist the Google parameter and keep your system safe)