Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with WooCommerce product variations not syncing correctly between different language versions of their site, even after installing the WPML Non-Persistent Cache as previously advised.
Solution:
We recommend manually editing each variation in the original product and saving it again. This action should resolve the syncing issue. It appears that the translations may have been damaged, and updating the variations can rectify this problem. If you're experiencing this issue, try the following steps:
1. Go to the original product.
2. Edit each variation.
3. Save the changes.
This method has proven effective in similar cases, as demonstrated in the example provided by our support team.

Please note that this solution might be outdated or not applicable to your specific case. If the problem persists, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, please open a new support ticket at WPML support forum for further assistance.

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

Last updated by Andreas W. 1 year, 10 months ago.

Assisted by: Andreas W..

Author Posts
May 23, 2024 at 2:43 pm #15663840

cristaG

Hi there,

Our site woo products variations are not being synced again.

We had this other ticket:https://wpml.org/forums/topic/woo-product-variations-not-synching/

As advised in the above ticket, to install WPML Non-Persistent Cache if the issue comes back, and it did. So we installed it, but the issue is still there.

Examples:

1. (English new variations): hidden link
2. (Finnish new variations not synced): hidden link

We do use object cache. And as advised in the earlier ticket to try to find specific object cache groups that are not included in the plugin WPML Non-Persistent Cache and that store variations, but we do not understand that part. Can you please provide these groups?

May 25, 2024 at 4:27 am #15669618

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server yourself for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Just take note that WPML should be registered on this site again.

If you are unable to provide such a copy of the site for testing, please let me know on this ticket.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

Best regards
Andreas

May 27, 2024 at 1:28 pm #15674435

cristaG

For example, product:
hidden link

May 28, 2024 at 9:25 am #15677205

cristaG

Its same with product categories. For example, hidden link category has 828 products but on Finnish side only 652 products

May 28, 2024 at 3:11 pm #15679431

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I went to WPML > Support > Troubleshooting and used the taxonomy sync options for the post type "Products".

Then I cleared the cache in WP Rocket in all languages and now I see 837 products on the Finish category.

Let me know if further assistance will be needed.

Best regards
Andreas

May 29, 2024 at 3:33 pm #15684789

cristaG

We already did that before as mentioned in our first ticket that followed the following guide:

https://wpml.org/forums/topic/product-variation-not-displaying-all-attributes-on-dropdown/

But now the issue is back.

That means something is causing it to come back.

May 29, 2024 at 3:56 pm #15684854

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I can still see 837 products here:
hidden link

This issue seems to be Cache-related, and I can only suggest clearing the cache from time to time if the issue occurs.

This means, that this seems not to be an issue in the backend or the database. It seems to be only an issue with the view and WP Rocket is causing the view is not updated.

This can only be solved by clearing the cached files from WP Rocket.

I suggest you test if it is advisable to set the archive pages and shop page on the exception list of WP Rocket, so that it will not keep caching those pages.

Now, to escalate this issue, so that our team can take a closer look at the issue, I will need to try to recreate it.

Would you be able to provide the latest version of WP Rocket so that I can provide a test site on which we can run some tests?

May 30, 2024 at 7:26 am #15686157

cristaG

No, its not WP Rocket. Because we tried it before when we had the issue. We disabled the WP Rocket, and the issue was still there, even when we checked with incognito. Therefore, its not WP rocket.

You might have fixed it using "WPML > Support > Troubleshooting and used the taxonomy sync options for the post type "Products"" which we also did, but 1 week later the issue came back, which is why we are here. And we are loosing sales because variations keep disappearing, and simply clearing cache is not fixing it. It should not happen in the first place, so we need a fix for it.

And as said in the last ticket by your colleague it is due to object cache conflict. So, we need to disable WPML groups that store variations from object cache, how?

May 30, 2024 at 11:07 am #15687470

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Were you maybe able to identify a pattern, that the issue only occurs on specific products?

Can you currently recreate the issue by translating a specific product? If so, please name me an example.

According to the older ticket, the issues were solved if the translation was applied again, which is kind of odd, as the sync option for attributes will only sync global attributes that are declared at Products > Attributes.

Only custom attributes, that are created directly on the products, will be synced when translating a product again with the WPML Translation Editor - there is no other way to sync those,

You are using the plugin Object Cache Pro and we do have various known issues with this plugin:
https://wpml.org/errata/object-cache-pro-various-issues/

We would need you to provide a link to a sandbox for testing so we can try to recreate the issue.

Would it be possible for you to install Object Cache Pro on this sandbox?

Take note, that it might be difficult to recreate such an issue for any details about the affected products, translation workflow, and used settings of the site can count. This is why it might be helpful if you even try to replicate the issue yourself.

May 31, 2024 at 6:21 pm #15693730

cristaG

We do not know exactly what is causing it. Just one day when we check variations in Finnish side, they are gone.

What do we now? wait until the problem comes back?

In my opinion if it is Object cache issue, due to variations being cashed, what groups does object cache uses to store these, so we could add it in the errata plugin?

June 1, 2024 at 3:16 am #15694350

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

You can install the following plugin and see the Object Cache Details including all available groups:
https://wordpress.org/plugins/query-monitor/

Source:
hidden link

For further assistance about this topic please consult the Object Cache PRO Support.

Further, I can offer that try to migrate a copy of your website to our test server on Cloudways, in case you will be able to activate Object Cache PRO there for testing and the site is not too big.

Would this be possible? How big is the website?

Best regards
Andreas

June 1, 2024 at 9:22 am #15694449

cristaG

I have cloned our new site again to the test server because even after I did what you suggested, variations are still not available.

For example:

In Finnish variations are missing:

hidden link

The same product on our real site:

hidden link

I added the new application details (with object cache enabled) by editing the private message above.

You could also transfer the site to your test server for testing purposes and delete it afterwords (Object cache comes with Cloudways, so you should be able to enable it form your site, right?)

June 1, 2024 at 3:12 pm #15694742

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Our own custom plugin does set the following groups to be excluded from cache:

wp_cache_add_non_persistent_groups( [
        'convert_url',
        'element_translations',
        'get_pages_adjust_ids',
        'get_user_admin_language',
        'translation_priority_relationships',
        'translationmanagement--get_translation_job_id',
        'wpml_cache_terms_per_lang',
        'wpml_endpoints_support',
        'wpml_pre_option_page',
        'wpml_register_string_filter',
        'wpml_register_string_filter--facetwp',
        'wpml_slug_translation_records--post',
        'wpml_slug_translation_records--taxonomy',
        'wpml_st_cache',
        'wpml_term_translation',
        'wpml_tm_blog_translators--has_translators',
        'wpml_wp_cache__group_keys',
] );

It uses the following WordPress function for this purpose:
https://developer.wordpress.org/reference/functions/wp_cache_add_non_persistent_groups/

The plugin can be downloaded here:
hidden link

On your staging, the plugin seems not to work, as it might be having a conflict with another plugin:

The plugin WPML-Non-Persistent-Cache.php_/WPML Non-Persistent Cache.php has been deactivated due to an error: Plugin file does not exist.

You would need to handle the exclusion directly inside Object Cache PRO's config.

Also, at Settings > Object Cache PRO > Tools you will find an option that shows you all groups that are currently present in the cache. See screenshot.

I suggest you follow this guide and ask the Object Cache PRO support for assistance:
hidden link

Captura de pantalla 2024-06-01 100020.png
Captura de pantalla 2024-06-01 100401.png
June 2, 2024 at 1:47 pm #15695626

cristaG

I deleted the file from the MU plugin folder and installed the plugin again. Now it works, but still variations are missing. I deleted Object Cache Pro and WP Rocket cache, but issue persists.

Example product, variations missing Finnish side:
hidden link

June 4, 2024 at 10:19 am #15701082

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

My apologies for the delay in answering, as Sundays and Mondays are my non-working days.

Your staging site appears to be very slow. I am not sure if this issue disappeared after I opened the Finish product translation on the WordPress Editor and clicked "Update" or if it disappeared because I ran all available updates on the site.

Do you have another example that occurred after implementing the suggested workaround?

Please also update Object Cache Pro, which is currently outdated on this site.