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 50 replies, has 3 voices.

Last updated by frankd-10 1 year ago.

Assigned support staff: Andrey.

Author Posts
June 29, 2018 at 1:44 pm #2446049

frankd-10

Today I noticed some of my add to cart links not working anymore. I discovered that suddenly a lot of my translated variation IDs of products were changed from the old ones. For example ID 117689 was changed to 115346.

Some of the translated variations also don't show up in the backend, but are still functional.

I found out about the issue today, I've updated to the latest WPML three days ago.

July 3, 2018 at 1:44 am #2455465

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting us. Please, my sincere apologies for the delay in answering. I would be very happy to help you but I didn't fully understand what is the issue.

When you access the cart, what happens? Also, we have recently released some updates for WPML and its add-ons. Please, could you update them to see if the problem persists?

If the problem persists, can you please elaborate a little more so I can better understand? Sometimes more screenshots illustrating what you mean may go a long way to clarify what words fail to transmit so if you like make use of "upload an image" below the comment area.

Thank you.

July 3, 2018 at 7:59 am #2455970

frankd-10

The problem doesn't necessarily persist, but they made one-time (for now) changes to some fundamental settings. I used to have a bunch of links to add product to cart, for example:

/?add-to-cart=115141&variation_id=115146&attribute_pa_sort=example&attribute_pa_flavor=example&quantity=40

However, after the particular event, the variation id of this product changed to something else. Result with the old link is that it tries to add a product to the cart that doesn't exist, with the behaviour that you would expect from it. Because the variation id changes, I had to change the URLs to:

/?add-to-cart=115141&variation_id=595684&attribute_pa_sort=example&attribute_pa_flavor=example&quantity=40

With the new link I can add the old product to the cart, as it was somehow assigned a new id.

July 3, 2018 at 6:27 pm #2459019

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for the explanation. I do not think WPML nor WCML has changed these variations IDs. I asked my colleagues about this and no changes were made to change the IDs of the product variations.

This probably happened because of some other change that is not related to WPML or WooCommerce Multilingual.

Maybe you updated some other plugin? Or imported products and variations for the products that had the IDs changed?

Thank you.

July 4, 2018 at 3:26 pm #2463949

frankd-10

Thanks for the reply. I would certainly expect that you guys did not update the plugin in order to change product ids, as that could mess a lot of things up 🙂

I have updated other plugins, none of which really have anthing to do with product ids. I haven't imported or changed anything about products.

Another symptom of the issue is that variations apparently exist within Woocommerce, but they don't show. See the attached screenshot. This issue persist on a staging site, with the twenty sixteen theme and all plugins disabled except for woocommerce and wpml. When I disable WPML it goes back to normal: 3 products (which used to be translations of each other) with 9 variations each.

Let me know if you need more details.

July 4, 2018 at 10:57 pm #2465275

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for the explanation. Please, what is the product you are looking at in the screenshot that you have posted above?

I'll need to request temporary access (wp-admin and FTP) to your site - preferably to a test site where the problem has been replicated if possible - in order to be of better help.

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.

Note:

*** Please, can I install the Duplicator or All in One Migration plugin to make a copy of your site and install it on my test environment? This will help me debug the problem.

*** Note: Please make a full backup of your site.

Privacy and Security when Providing Debug Information for Support: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Thank you.

July 10, 2018 at 2:06 pm #2482002

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you. I tried installing Duplicator, but it looks like the database is too large and so the package is not created.

I see that the _postmeta table has more than 1.3Gb and the final database has ~1.6Gb. I've tried using All in One Migration, but this looks like it "crash" at 55%. I'll attach an image for you to see.

Please, could you try to back up your site and send me the link for me to download? You can filter the media files (filtering images, pdf, etc), as this should not be necessary to debug the site.

Your next message will be private so if you can back up the site, add the link for me to download.

Thank you.

July 11, 2018 at 12:06 am #2484779

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you. I've been able to download your site and I'm testing it in my testing environment.

I will contact 2nd tier support and soon we will contact you.

Thank you.

July 11, 2018 at 8:11 am #2485483

frankd-10

Ok, thanks for letting me know

July 13, 2018 at 1:58 am #2491210

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Just as an update, our 2nd tier team will soon check your ticket and get in touch with you.

Thank you.

July 16, 2018 at 8:23 am #2527683

frankd-10

Any update? I know you guys are busy, but I think it's getting worse.

July 17, 2018 at 1:59 am #2528895

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Sorry for the delay. I already reported this to 2nd tier support. I'm still waiting for their response. Soon we will contact you.

Thank you.

July 19, 2018 at 3:50 am #2533922

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

The 2nd tier support seems to have solved the problem. Please, follow the steps below:

- Backup your database
- Update the WordPress to the latest version

It looks like some of these items are in opposing languages and so is not displaying correctly. To fix the problem you will need to edit the _icl_translations database.

To do this, open your database (you can use PHPMyAdmin or Adminer) and select the option to write a query using SQL.

SELECT *  FROM `wp_icl_translations` WHERE `element_id` IN (115142,115143,115144,115145,115146,115147,115148,115149,115150) AND element_type = "post_product_variation";

This will display the list of variations in the default language. Make sure that the columns "language_code" is set to "en" and the "source_language_code" is set to "NULL". I'll attach an image for you to see (db-error-en.png).

Then use the SQL line below to search for products that are in the secondary language.

SELECT * FROM `wp_icl_translations` WHERE `element_id` IN (115325,115327,115328,115329,136749,137556,137565,137566,137564);

Make sure that for all items that are displayed, the "language_code" is set to "nl" and the "source_language_code" is set to "en". I'll attach an image for you to see (db-error-nl.png).

* Note that I am using the database prefix as "wp_". If your prefix is different, please change the above query.

After following these steps, please let me know if the problem persists. If you want, I can do it for you. Just let me know.

Thank you.

July 20, 2018 at 4:29 pm #2565160

frankd-10

Thanks for the reply. I can confirm changing this, the variations show up again on my staging site. The issue that is causing this is still present I think. On my live site, when I check out all posts with parent_post=115324 and post_type=product_variation, 9 variations show up. However when I try to select all those 9 variations (by id) in the wp_icl_translations table, only 6 of them are found, so I can't edit those. It's like they're not in the table.

BTW: I only get a notification the first reply you give to me (which was about waiting a little longer). I don't get a notification when you post again (with part of the solution). Might look into that, as I never knew when you got back to me.

July 20, 2018 at 5:34 pm #2565316

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

When you search for the IDs, without doing any other filter, the products are not found? Are they displayed in the default language? If so, have you tried to update the product in the default language to see if the variations will be synchronized with the secondary languages?

Also, in WooCommerce > WooCommerce Multilingual > Settings > Troubleshooting (at the bottom of the page), check the "Sync products variations" option and click on the "Start" button.

After following these steps, does the problem still persist? If yes, please could you create a new testing environment so we can check?

Thank you.