This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.


This topic contains 3 replies, has 1 voice.

Last updated by albertL-5 1 year, 9 months ago.

Author Posts
October 1, 2018 at 3:50 pm #2778669


I am trying to: Get GDPR Cookie Consent to function on /de and /fr

Link to a page where the issue can be seen: hidden link
Works as expected in default/English page
hidden link

I expected to see: After clicking [ Accept ] cookies button, a newly loaded page with GTM and AddThis scripts in it (search elements/source for "google tag manager" or ""

Instead, I got: The unchanged page (except for cookie values) reloaded.

Has this come up before? I haven't been able to find any threads about it. This specific plugin is mentioned in WPML documentation, but only in a how-to about displaying translated content. No mention of functionality issues.

Does WPML add something or treat localized pages differently in a way that would interfere with this plugin?

We are working on this in the live production site, so I'm not authorized to give access and can't enable DEBUG. Please let me know if that's absolutely necessary (and at what user level) to diagnose/resolve this. Thanks.

October 2, 2018 at 10:42 am #2781124


Conjecture—Does WPML somehow treat each set of localized pages as its own "domain" with caching rules that would override how cookies are allowed or read compared to at the default (in this case English) site? In our case, the /fr and /de pages seem to behave as if they are hosted on a server with server-side caching that shows the same page on clicking [ Accept ] cookies as on first landing. If this is the case, how to force WPML to serve a fresh uncached page?

We ran into this issue with WPEngine hosting's server-side caching. The solution was to have them explicitly add GDPR Cookie Consent cookies to a "do not cache" list. Is there an option like that for WPML language folders?

As I said, conjecture. This is what the behavior *seems* or *feels* like.

October 2, 2018 at 5:52 pm #2782434


Better (hopefully) described to me by a developer…

For /fr and /de pages, the browser is sending cookie values along w the request for the page, but the server, when rendering those pages, isn't able to get those values. Testing shows that the cookie banner cookies are not being found. These are the cookies that are important for returning the correct rendered page (with or without cookies/scripts, based on whether visitor clicks Accept or Reject in GDPR banner).


Compare English pages to /fr and /de pages after clicking Accept and Reject. English pages are rendered correctly. /fr and /de pages are missing scripts. Also see console log for success feedback.

October 3, 2018 at 2:12 pm #2784780


My issue appears to be resolved now. *fingers crossed*