Problem/Motivation
The Cookiebot module can automatically show the automated cookie information on a page.
The problem is that it matches the configured page’s path alias against current patch alias, instead of a node id. This fails when the aliases are different in different languages on multilingual sites.
Proposed resolution
The solution proposed here is to instead match the page's node ID against the configured page's node ID. Patch supplied in comment.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | fix-multilingual-support-for-declaration-node.patch | 5.29 KB | pontus.talvikarhu |
Comments
Comment #2
pontus.talvikarhu commentedComment #3
jhuhta commentedNice patch with the upgrade path included, and fixes the problem for us.
I started to think that maybe this feature of showing the declaration shouldn't be limited to nodes, but also allow it on any other page type as well. But that would be a broader change clearly out of scope of this issue.
Comment #4
bramdriesenLooks good! Very thorough patch. Will commit soon.
Comment #6
bramdriesenComment #7
webflo commentedUpdate hook cookiebot_update_8003 fails when cookiebot_show_declaration_node is empty (not configured).
Comment #8
bramdriesenLooks like we need an extra condition in the update hook then.
Comment #10
bramdriesenComment #12
jamsilver commentedRaised a follow up issue, requesting we store this node reference as a UUID rather than an ID to make it simpler to script the set-up and deployment of this module: https://www.drupal.org/project/cookiebot/issues/3414375