Skip to content

Cookie List plugin renders cookies from all domains in multi-domain setup

We have a TYPO3 installation with multiple domains/page trees:

  • Website A (German only)
  • Website B (English only)
  • Website C (German default, english translation)

The Cookie List plugin currently renders the cookies (essential_cookies) from all websites. A filter to the current root page solves the issue.

Classes/Controller/OptinController.php, Line 188+

$cookies = $queryBuilder->select('*')
    ->from('tx_sgcookieoptin_domain_model_cookie')
    ->where(
        $queryBuilder->expr()->eq('parent_group', $defaultLanguageGroupUid),
        $queryBuilder->expr()->eq('pid', $rootPageId)
    )
    ->andWhere($queryBuilder->expr()->eq('sys_language_uid', 0))
    ->execute()
    ->fetchAll();
Edited by Sebastian Klein
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information