Please make sure to update to WPML 4.3.5 and check our list of Known Issues before reporting

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.

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

Problem: The user was having issues with a composite product showing some child products that are out of stock. Solution: This is an issue with the Composite Products plugin, the issue is present on primary language even if WPML is deactivated.

This topic contains 26 replies, has 2 voices.

Last updated by tobiasL-11 3 months, 1 week ago.

Assigned support staff: Jamal.

Author Posts
August 22, 2019 at 1:24 pm #4439681

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

The compatibility team and I were not able to reproduce the issue. As per WooCommerce Multilingual, product_visibility taxonomy is set to "Don't Translate" hidden link which is good.

The translation of the taxonomy has been done sometime before. We cannot tell when or how.

They suggest to set the taxonomy back to "Don't Translate", this is already set correctly as I confirmed in my reply(#4299467). Then delete the translations of the taxonomy terms from the database. This will fix the issue.

Let me know if there is anything else I can do.

Best regards,
Jamal

August 22, 2019 at 1:56 pm #4439955

tobiasL-11

Hello Jamal,
so I just have to delete the translations from the database now, right? Can you tell me how to do that?

Cheers
Franziska

August 23, 2019 at 11:18 am #4446331

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Franziska,

Go to your database user interface(usually phpmyadmin) and execute the following queries to see the data that should be removed.

-- 1. The translations from icl_translations table
SELECT * FROM `wpstg2_icl_translations` where element_type="tax_product_visibility" and element_id in (SELECT term_id FROM `wpstg2_terms` where slug like "%-en" and term_id in (SELECT term_id FROM `wpstg2_term_taxonomy` where taxonomy="product_visibility"));

-- 2. The translated terms in terms table
SELECT * FROM `wpstg2_terms` where slug like "%-en" and term_id in (SELECT term_id FROM `wpstg2_term_taxonomy` where taxonomy="product_visibility");

-- 3. The terms relationships to the product_visibility taxonomy
SELECT * FROM `wpstg2_term_taxonomy` where taxonomy="product_visibility" and term_id not in (SELECT term_id FROM `wpstg2_terms` where slug like "%-en");

Then here is the code to execute to delete the data:
1. The translations from icl_translations table.

DELETE FROM `wpstg2_icl_translations` where element_type="tax_product_visibility" and element_id in (SELECT term_id FROM `wpstg2_terms` where slug like "%-en" and term_id in (SELECT term_id FROM `wpstg2_term_taxonomy` where taxonomy="product_visibility"))

2. The translated terms in "terms" table.

DELETE FROM `wpstg2_terms` where slug like "%-en" and term_id in (SELECT term_id FROM `wpstg2_term_taxonomy` where taxonomy="product_visibility")

3. The terms relationships to the product_visibility taxonomy

DELETE FROM `wpstg2_term_taxonomy` where taxonomy="product_visibility" and term_id not in (SELECT term_id FROM `wpstg2_terms` where slug like "%-en")

Please note that you will run this code on your own responsibility, make a database backup to be on the safe side

Best regards,
Jamal

August 23, 2019 at 11:22 am #4446341

tobiasL-11

Hello Jamal,
I'm sorry but I am no programmer, so I don't know how to access the database user interface. Is there a way to do this using the normal wordpress-backend?

August 23, 2019 at 1:12 pm #4447529

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

There is no way to do this using WordPress backend. It is required to access the database. You can ask your hosting provider to make a database backup and run those queries for you. That way, the hosting provider can help you restore the database if the issue is not resolved.
I would also suggest running cleanup actions in WPML->Support->Troubleshooting, after this manipulation.

Here a tutorial by a hosting company on how to run SQL queries in phpMyAdmin.
hidden link

Worth also to mention that you can have full access to the database through WordPress if you use a plugin such as "WP phpMyAdmin" or "Adminer"

Best regards,
Jamal

August 26, 2019 at 1:15 pm #4459123

tobiasL-11

Hi Jamal,
I deleted the datatbase entries but it didn't help.

Cheers
Franziska

August 26, 2019 at 1:53 pm #4459383

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi Franziska,

Can you tell me how do you check if it is not working? I will run again tests on my computer and check before getting back to you.

Best regards,
Jamal

August 26, 2019 at 2:04 pm #4459469

tobiasL-11

Hi Jamal,
I just noticed that the beginning of this chat has a kind of wrong introduction. The actualy problem connected to the "product visibility taxonomy" is not the duouble restock, but it#s the following:
I'm having a problem in which the Composite Product is showing a component which is out of stock; I'd like for that to be hidden completely on the Composite product's single product page.
The rest of the explanation from somewhere warm support is correct.

I tested this now but it's still showing even though it's out of stock.

August 26, 2019 at 3:28 pm #4460163

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi,

Please tell us which composite product? What is the product that should not appear? And if this is working in one language and not working in the other one.

Best regards,
Jamal

August 26, 2019 at 3:36 pm #4460181

tobiasL-11

composite product:
German:hidden link
English: hidden link

The products which should not apprear are the cases (components) which are out of stock. e.g. yellow.
It's not working in either language

August 27, 2019 at 11:07 am #4465631

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

My apologies for the late reply. I had to rebuild my local copy of your website to undo the database changes I have made previously.

I still need your help to understand the issue and resolve it.
Taking, for example, the product (YELLOW WITHOUT PROTECTION NOTCH with id #1914) which is out of stock and should not be available as an option for the Composite Product (/shop/blank-cassettes-en/?lang=en).
Even if I deactivated WPML and tested the product is still available as an option. I played with its inventory settings to make it, "In Stock" then changed it to "Out of stock". I checked the database to see if the product is attached to any existing "product_visibility" translation. It is not the case as you can see in the attached image, the product is attached to correct product_visibility terms.
As far as I can tell the issue is not related to WPML here. Please use the following URL to login to a clean install. Deactivate WPML. Upload the composite products plugins and create a similar product with options where we can confirm that this is not a Composite Products issue.
hidden link

Please check if there is any other product that is for example not available in the default language and available in English. This would help us a lot to spot the real issue.

If you can also contact back the Composite Products plugin support and ask for more details on how we can spot this issue.

Any details you provide to understand better this issue will let us resolve this quickly.

Thank you,
Jamal

September 3, 2019 at 8:16 am #4501889

tobiasL-11

My issue is resolved now. Thank you!