Skip Navigation

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

Last updated by Mohamed Sayed 1 year, 8 months ago.

Assisted by: Mohamed Sayed.

Author Posts
October 11, 2023 at 2:04 pm #14560027

Mohamed Sayed

Thanks, this issue is escalated to our developers with a copy of your site. I will let you know once I have any updates.

October 12, 2023 at 3:34 pm #14567401

Mohamed Sayed

Hi,
Thanks for your patience!

Our developers found that the translation settings are messed up and due to this, terms are not synced correctly.

After checking the product query they noticed the following product is missing from the results "/ca/cataleg/kontrabanda-komunikazioa-tour-2xlp/"

This is because the catalog visibility for this product is set to "Hidden", changing the setting to "Shop and search results" fixes the issue.

To fix this behavior in the 2nd language, please create a full backup of the database and website then try the following steps:

1. Go to your database manager (Like phpMyAdmin)

2. Go to the SQL tab and run the following query:

DELETE FROM `wp_icl_translations` WHERE `element_type` = 'tax_product_visibility';

3. Go to WPML > Settings > Post Types Translation and set these post types to "Not translatable":

- Refunds
- shop_order_placehold
- Custom CSS (custom_css)
- Changesets (customize_changeset)

4. In the Taxonomies Translation section, set this taxonomy to "Not translatable":
- Template Part Areas (wp_template_part_area)

5. In the Taxonomies Translation section, set this taxonomy to "Translatable
only show translated items":
- Navigation Menus (wp_navigation)

6. Go to WPML > support > Troubleshooting and click the following:

- The "Synchronize posts taxonomies" option for Products
- The "Synchronize posts taxonomies" option for Variations
- Fix terms count

7. Go to WC > Status > Tools and clear "WooCommerce transients" and "Expired transients"

After that, you will see the same results in all languages and then you can change the above product's visibility settings.

PS: Some of the adjustments suggested above are not related to this issue, but those are needed to prevent further issues with WPML.

Let us know please how that goes.

Kind regards.

October 16, 2023 at 8:42 am #14582439

ireneS-3

Hi,

It solves the issue partially.
Now all 3 languages show the same but it still show a blank placeholder when a product is occult although I'm not sure this is WPML related...

Making some more test, I see that the result is erratic. Navigating thru the 3 languages and reloading page shows different results: sometimes 67 results, sometimes 68

October 16, 2023 at 3:36 pm #14586573

Mohamed Sayed

I'm checking with our developers about those issues and will update you here soon.

I also noticed that the two issues are showing in the default language too, could you please disable WPML temporarily and check if the issues are fixed in the default language?

October 17, 2023 at 8:26 am #14591185

ireneS-3

Hi,

When WPML is disable the inconsistency in product count is still there in default language.
I have to say that there is no inconsistency in product number in my local site, it seems to only happens in live.

October 17, 2023 at 10:05 am #14592617

ireneS-3

I don't know if it could be related but could you check if this configuration is ok:

WPML->Taxonomy translation->Visibilitat del producte

I see a lot of duplicated entries

October 17, 2023 at 10:22 pm #14598355

Mohamed Sayed

I don't think it's related, could you please provide the login details to the test site again so I can check?

I tested the steps provided by our developers on the local site copy and the two issues are fixed as you can see here: hidden link

October 18, 2023 at 9:54 am #14601333

ireneS-3

Hi,
The support user is enable on the live site so you can access it.
In your video is I see it's ok, may be I'm wrong but it seems that no products are set to hidden and that why it works fine. The problem appears when there is some hidden products and that what I need.
Anyway your free to check my live site...

October 18, 2023 at 10:05 am #14601371

ireneS-3

I try to send you a video but I don't know how to do this...

October 18, 2023 at 6:54 pm #14608551

Mohamed Sayed

Hi,

I tried the steps again on the live site and got the following results:

- The product count issue was fixed in all languages
- The first catalog page in each language shows 20 products if no product is set as hidden

Please see here: hidden link

After setting one product to be hidden, all the languages show the same number on the first page (19 products) with an empty space for the hidden product.

I disabled WPML and got the same result with the default language as you can see here: hidden link

So I don't think this is related to WPML.

October 18, 2023 at 8:07 pm #14608781

ireneS-3

Well, I personally don’t know where the problem is coming from but other users with the same issue also point out WPML translation duplicates as responsible:

https://wordpress.org/support/topic/hidden-products-are-counted-in-catalog-and-causes-empty-spaces/

October 18, 2023 at 9:17 pm #14608925

ireneS-3

I finally find the solution.
I let you a link that expose a similar case that helps me to resolve the issue.
In my case it seems that translating product visibility create duplicate terms/slugs (as I told you a few post before) causing the query to mess up.
Removing the duplicate terms in Products > Product Visibility (after setting the “show_ui” option true) solves the issue.
In my shop it’s ok to have Product Visibility to no translation but I think your developers should be aware that setting it to translate seems to be problematic.

hidden link

October 19, 2023 at 1:23 pm #14615495

Mohamed Sayed

I'm glad to hear that you managed to find the reason for this issue. Thanks for sharing this info with us as it might help other clients if they have the same issue.

I installed WooCommerce on a clean installation and found that the Product Visibility is set to "Not Translatable" by default and locked. Probably, this setting was changed on your site by another plugin.

Screenshot_247.png