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 32 replies, has 2 voices.

Last updated by Itamar 1 year, 5 months ago.

Assigned support staff: Itamar.

Author Posts
January 31, 2018 at 1:21 am #1502306

pawelM-9

It looks like I have the same problem as:
https://wpml.org/forums/topic/products-disappearing-from-cart-when-on-another-language/

But with me running the "Store a language cookie to support language filtering for AJAX" option causes cache problems.
When you run this option, cookies are added which prevents the correct operation of the Nginx cache

Cookies:
_icl_current_language
wpml_referer_url

The Problem with the disappearance of products from the basket applies only to parts of products

January 31, 2018 at 9:24 pm #1503436

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Are you running the latest versions of WPML and its add-ons?
Are WordPress and WooCommerce updated to their latest version on your site?

Could you please share your Debug information with me?
You can read a detailed explanation about it here.
http://wpml.org/faq/provide-debug-information-faster-support
The debug info will give me a lot of information about how your site is configured and will help me understand the source of the problem.

Please could you provide me the additional info?

Thanks,
Itamar.

January 31, 2018 at 11:39 pm #1503512

pawelM-9

sending debug

February 1, 2018 at 12:20 pm #1503926

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Thanks.

Could you please tell me how I can see the issue on your site?
When I try to add products to the cart in the German language and then go and view the cart, it is working. I can see the products in the cart. Please see attached screenshot.
I can even switch between languages and the products stay on the cart.
Have you fixed this issue?

February 2, 2018 at 4:04 am #1504845

pawelM-9

Please test it on this development version.

Add this product to the basket:

dev.*********.com/pl/produkt/zestaw-do-czyszczenia-pax-23/

Can I ask for the possibility of hiding links in the forum content?

February 4, 2018 at 8:23 pm #1506543

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

I can see the problem on the development version.
I can see that on the live site, the same product is added to the cart.
1. So what is the difference between the sites?
2. Is it a direct duplication of the live site?
3. How have you made the copy of the site?
4. Is everything updated on the dev site?
5. Is it only happening with this specific product or with all the products?
6. Is it happening only in the Polish language or all the languages?

P.S. external links on our forum are showing only to logged in users. Therefore, they are seen by search engines. If there is a link that you want to me to delete please tell me.

February 4, 2018 at 9:51 pm #1506562

pawelM-9

1. The only difference is in the production version this option is selected:
hidden link
2. This is a 1: 1 copy from the live version
3. The copy was made by hand
4. Everything was up to date, until the release of Woocommerce 3.3, which we have not done yet
5. The problem only occurs with some products. It's hard for me to find out why this is happening.
6. The problem concerns different language versions, e.g. it

February 5, 2018 at 10:11 am #1506843

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

You wrote to me, the following:
But with me running the "Store a language cookie to support language filtering for AJAX" option causes cache problems. When you run this option, cookies are added which prevents the correct operation of the Nginx cache
Cookies:
_icl_current_language
wpml_referer_url

1. How have recognized that the cookies are the source of the problem?

And also to summarize the above:
A. Both sites are on the same Ngnix server.
B. The Ajax option that is working on the live site is not working on the staging site.

2. Is the above correct?

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.
You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved, I will delete the local site. Let me know if this is ok with you.

** IMPORTANT **
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields, this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

February 5, 2018 at 10:26 pm #1507847

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

The wpml_referer_url – Stores the last requested URL on the front-end.
And that is why it is pushed out every time the page is opened by the plugin "woocommerce-multilingual" as you write.
https://wpml.org/documentation/support/browser-cookies-stored-wpml/

Is this information helpful for you?

February 6, 2018 at 8:44 am #1508131

pawelM-9

I have read such a brief description. But I still do not know what it is used for later.

Is it possible to disable this without having to interfere in the plug-in code?

February 6, 2018 at 2:28 pm #1508692

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I'll try to get an answer about this from our second tier and will get back to you here.

February 6, 2018 at 3:07 pm #1508739

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Here is the answer from our second tier supporter.

The cookie is required for some ajax requests. Based on that cookie, the language for the ajax request is set, and it works properly in the second language. It is set on every visit because it should be -> you can switch language, and if the cookie is not set then, you can get incorrect information.

Does this information answer your question?

February 6, 2018 at 7:43 pm #1509111

pawelM-9

In my opinion, you should think more about this function. Because by requesting caching on any server that uses nginx cache it will not work properly.

In the current state, I can not use this option. Therefore, the "Store a language cookie to support language filtering for AJAX" option has been disabled, which has increased the problem with the disappearance of products from the basket.

Do you have any solution for this?

I have already sent you full access to the site, and there is a problem for productions, e.g.
/pl/produkt/zestaw-do-czyszczenia-pax-23/

February 7, 2018 at 10:45 am #1509735

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

I see.

I'm waiting for our second tier reply on this.
I'll keep you updated here.

February 8, 2018 at 4:42 pm #1511863

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and sorry for the late response here.

To continue investigating this issue and escalate it to our second tier I need to replicate the issue on a clean WordPress installation with Nginx server. For this, I've asked our system team to set up a Nginx server for me.
Here is the definition of the issue that I have to check according to what we have discussed here.
Definition: Check if the "Store a language cookie to support language filtering for AJAX" option is causing products to not show on the cart when the site is running on a Nginx server with caching method.
To test it I need more information from you, please.
What caching methods on the Nginx server are you using?
Please give me as many details as you can so I'll be able to replicate the issue on our server.

Thanks,
Itamar.