We have just released WPML 4.3.3. Before reporting issues please make sure to update - this version resolves all known issues with the major WPML 4.3 release

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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.

Tagged: 

This topic contains 29 replies, has 6 voices.

Last updated by florianH-10 2 years, 9 months ago.

Assigned support staff: David.

Author Posts
September 16, 2016 at 9:25 am #1083132

lucM-5

Hi,

I have a performance issue as caching is broken on Pagely hosting. Below is the feedback I got from Pagely support. Currently the site hidden link only uses 1 language, but extension to multiple languages is foreseen for the coming months. I've disabled BROWSER LANGUAGE REDIRECT (see attached screenshot) - but still it seems that cookies are set, which doesn't seem to make a lot of sense. How can this be disabled?

I'm using WP 4.6.1, and WPML plugin in up to date.

Thanks

Luc

==========
When I check over the header replies, it seems that two cookies are generated which consistently interrupts the cache when tested:

curl -sI hidden link | grep "Set-Cookie\|X-Cache-Status"
Set-Cookie: _icl_current_language=en; expires=Sat, 17-Sep-2016 08:47:07 GMT; Max-Age=86400; path=/
Set-Cookie: _icl_current_language=en; expires=Sat, 17-Sep-2016 08:47:08 GMT; Max-Age=86400; path=/
X-Cache-Status: MISS

--

curl -sI hidden link | grep "Set-Cookie\|X-Cache-Status"
Set-Cookie: _icl_current_language=en; expires=Sat, 17-Sep-2016 08:47:52 GMT; Max-Age=86400; path=/
Set-Cookie: _icl_current_language=en; expires=Sat, 17-Sep-2016 08:47:55 GMT; Max-Age=86400; path=/
X-Cache-Status: MISS

--

curl -sI hidden link | grep "Set-Cookie\|X-Cache-Status"
Set-Cookie: _icl_current_language=en; expires=Sat, 17-Sep-2016 08:48:17 GMT; Max-Age=86400; path=/
Set-Cookie: _icl_current_language=en; expires=Sat, 17-Sep-2016 08:48:19 GMT; Max-Age=86400; path=/
X-Cache-Status: MISS

--

curl -sI hidden link | grep "Set-Cookie\|X-Cache-Status"
Set-Cookie: _icl_current_language=en; expires=Sat, 17-Sep-2016 08:51:30 GMT; Max-Age=86400; path=/
Set-Cookie: _icl_current_language=en; expires=Sat, 17-Sep-2016 08:51:32 GMT; Max-Age=86400; path=/

So we can tell from the extracts above that X-Cache-Status is always MISSED when a worst it should be the first request followed by consecutive HIT values. The particular cookie is also generated by WPML, unfortunately.
==========

September 16, 2016 at 2:27 pm #1083730

David
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

The cookie is needed in the frontend for several operations: file uploads, posting comments and probably more. These requests dont have the language information attached so we have to resort to a cookie.

Can you find out if there is a way to tell Pagely to ignore this particular cookie?

September 20, 2016 at 4:52 am #1088638

lucM-5

Hi David,

I answered your latest reply by email, but that doesn't seem to get through. Let me briefly recap.

At this time, the site is using only 1 language - but we will extend to multiple languages in the near future. De-activitating WPML decreases web site loading time by a factor of 3 - so you'll understand why this is important. I checked with Pagely, and their caching is broken if a cookie is present. So I am looking in your direction.

Especially so as you are talking about the need for the cookie from the frontend, and giving the following examples
- uploading a file from the frontend
- posting a comment from the frontend
which are functions that I do not need at all for this site (posting comments has actually been disabled).

Remains the question what do you mean by the "probably more" ? That seems to be pretty vague, so what exactly do you mean there??

Is there a way for disabling this cookie from WPML side? At this time, I see no need for it given the use case you describe but it is tripling load times.

FYI: at this time, WPML has been de-activated on the site until a solution has been found.

Thanks,

Luc

September 20, 2016 at 1:55 pm #1090050

David
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

I had a similar report and did some further investigation here:
https://wpml.org/forums/topic/disable-_icl_current_language-cookie/#post-1090046

When I said "probably more" is because I havent thoroughly checked if the cookie is used anywhere else, but Im pretty certain its just ajax and comments.

As I mentioned in the other ticket, I think its better to find a server side solution. Can you investigate the possibilities?

September 20, 2016 at 2:14 pm #1090081

lucM-5

David,

I already investigated the possibilities with Pagely, and it is not possible. I read the thread you referred to, but the example there related to a situation where is user is logged on to WordPress only - which is not the case in my situation.

Especially as loading times are tripled, I wonder how to disable the current language cookie - especially if this cookie is only used for the scenario's that you describe.

So how the cookie be disabled in an elegant way - meaning: not overwriting it when installing a WPML update?

Thanks,

Luc

September 20, 2016 at 6:02 pm #1090713

David
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

This is just a short update.

I found that we can get rid of one of the cookies with the following line of code:

global $sitepress;
remove_action( 'wp_loaded', array( $sitepress, 'maybe_set_this_lang' ) );

You can place it for example in functions.php of your theme.

Im talking to the development team about what we can do with the second cookie.

September 20, 2016 at 6:55 pm #1090783

lucM-5

David,

Indeed, that disables the first cookie - already with a visible impact on loading time.
I'll wait for your reply concerning the second cookie.

Thanks,

Luc

September 21, 2016 at 3:23 pm #1093143

David
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

There is good news. Amir joined the conversation and he decided to provide support for this. You can read more about it over here:

https://wpml.org/forums/topic/disable-_icl_current_language-cookie/#post-1091273

September 21, 2016 at 7:11 pm #1093414

lucM-5

Thanks,
I read in the other thread on current language cookies that you're planning to do 2 things

1. Make this cookie optional, explaining in the GUI which operations will NOT work if you disable that cookie.
2. Work with Page.ly to correctly exclude these cookies from their cache.

Is there any timing on this?

Thanks,

Luc

September 22, 2016 at 10:22 am #1094498

David
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

I asked the development team for feedback yesterday and Im waiting for a reply in any moment. I will update you when I have it.

September 22, 2016 at 10:37 am #1094542

David
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

The core development team is actively working on this as we speak, this feature has gained quite a bit of traction. I would expect to see it in our next minor release if everything goes as expected. Im afraid we dont have a date for it yet.

September 22, 2016 at 3:10 pm #1095342

matthewL-6

Hi David,

Do you have a rough date? We're planning on moving back to WPML if this will be released within the next few weeks.

September 22, 2016 at 3:27 pm #1095357

David
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

The list of bugs for wpml 3.5.3 is already closed so this will be release in 3.6.0
I expect a beta release of 3.6.0 before the final release.

But as I said, we dont have a date. It will be released when its ready.

Im sorry

November 29, 2016 at 11:44 am #1146360

sebastianT-2

I have the same problem and found this thread while searching for a solution.
I just updated WPML to 3.6.0 and after the update I have 5 Set-Cookie instead of 3.
Is there a solution for this issue included in version 3.6.0? Or is there any alternative solution for this problem?

November 29, 2016 at 12:13 pm #1146418

David
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

The task is in our queue but didn't make it for the 3.6.0 release.
Let me try to find out a schedule and I will get back to you.