by inspecting html source of hidden link, I see there is a block:
<script id='wpml-cookie-js-extra'>
var wpml_cookies = {"wp-wpml_current_language":{"value":"en","expires":1,"path":"\/"}};
var wpml_cookies = {"wp-wpml_current_language":{"value":"en","expires":1,"path":"\/"}};
</script>
With two "var wpml_cookies = ..." identical lines.
Checking the php source code of WPML plugin I figured out it shouldn't be by design. So I ask if you have an idea why it may happen and if you can actually confirm it happens on some site of yours.
--
Also, if I'm logged out from the dashboard, the <script id='wpml-cookie-js-extra'> is missing completely from front end. Is it by design too? In what conditions that scripts is present in front end?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
What makes you think that this is a design issue?
The variable "wpml_cookies" is a JavaScript object that includes all cookies. It saves all the cookies inside one variable as an object by using key and value pairs.
hidden link
This variable can be called various times to add, edit or remove entries from this object.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I can not yet confirm this issue on my test site: hidden link
Could it be that your site is using custom code that hooks into the WPML cookie behavior?
On your staging, could you please run the website with minimal setup to see if the problem persists?
1) Disable any additional plugins that have nothing to do with WPML and our add-ons. Does the issue persist?
2) If the issue goes away, start reactivating plugins one at a time or reactivate them in small groups. In this way, check where the problem occurs again to see the plugin that is causing the problem.
3) If this does not resolve the cause of the problem, please switch the first switch to the Space Oddity parent theme, then test again. If the issue still occurs, switch to a standard theme such as Twenty Twenty-Four to see if the problem may be related to the theme.
Once we have identified the cause, we can then attempt to replicate the problem and then escalate it internally.
The topic ‘[Closed] Two lines for "var wpml_cookies = …", or nothing.’ is closed to new replies.