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.

Comments

pontus.andersson created an issue. See original summary.

pontus.talvikarhu’s picture

Issue summary: View changes
StatusFileSize
new5.29 KB
jhuhta’s picture

Status: Active » Reviewed & tested by the community

Nice 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.

bramdriesen’s picture

Looks good! Very thorough patch. Will commit soon.

  • BramDriesen committed e51e99b on 8.x-1.x
    Issue #3285787 by pontus.andersson, jhuhta, BramDriesen: Multilingual...
bramdriesen’s picture

Status: Reviewed & tested by the community » Fixed
webflo’s picture

Update hook cookiebot_update_8003 fails when cookiebot_show_declaration_node is empty (not configured).

bramdriesen’s picture

Priority: Normal » Major
Status: Fixed » Needs work

Looks like we need an extra condition in the update hook then.

  • BramDriesen committed 5f26814 on 8.x-1.x
    Issue #3285787 by pontus.andersson, BramDriesen, jhuhta: Multilingual...
bramdriesen’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jamsilver’s picture

Raised 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