Issue with is_siteroot-Check for translated pages in AddCookieOptinJsAndCss
If a root page (pages.is_siteroot = 1) is translated by an editor who is not authorized to set is_siteroot, this value is set to 0 in the DB.
For translated pages (l10n_parent > 0), however, this switch does not exist in the backend, as TYPO3 either does not take this into account internally or adopts it from l10n_parent. The is_siteroot switch is only available for the default language.
The problem is that the JavaScript for the cookie consent is only inserted if is_siteroot for the current page (in the current translation) is 1.