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.
Related documentation:
This topic contains 10 replies, has 2 voices.
Last updated by Osama Mersal 1 year, 2 months ago.
Assisted by: Osama Mersal.
Author | Posts |
---|---|
August 25, 2023 at 7:51 pm #14293831 | |
victorN-3 |
Tell us what you are trying to do? Trying to Edit my products i click on filter by category but in category sashimi for example i have 5 products but it shows only 1. Is there any documentation that you are following? No Is there a similar example that we can see? not to my knowledge What is the link to your site? hidden link |
August 28, 2023 at 6:53 am #14297431 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for contacting WPML forums support. I'll be glad to help you today. First of all, sorry for the late reply due to a higher workload. On the front end, the mentioned category seems to have 5 products. (Kindly check the attached screenshot) If you face this issue on the dashboard, please try the following steps: 1- Go to WPML-> Support-> Troubleshooting ❌ Please backup your database before performing the above test ❌ Kindly let me know if the above steps helped you fix the issue. Best regards, |
September 1, 2023 at 9:16 am #14325377 | |
victorN-3 |
Hello Osama, Thank you for your reply and i apologise for the late reply. Currently the issue is in the backend dashboard but the front end is ok. Sadly your suggested solution did not result in a solution. Any other things you can think of? Cheers, |
September 1, 2023 at 1:03 pm #14326681 | |
victorN-3 |
Hello Osama, I have been analysing the problem further and found the following: If I make a new product and assign it to sashimi category it does not appear in the category when filtering in dashboard but I can see it in all products list. Cheers, |
September 2, 2023 at 9:49 am #14329889 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi Vic, Thanks for your update. I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Your next answer will be private, which means only you and I can access it. ❌ Please backup your database and website ❌ ✙ I would need your permission to de-activate and re-activate the Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical. ✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site. Best regards, |
September 3, 2023 at 7:31 am #14331079 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi Vic, Thanks for the access details. I tried to reproduce the issue by creating and translating a new product. After that, I filtered the products in the dashboard using the category, which worked correctly. Kindly check this video. (hidden link) Please let me know the steps to reproduce the issue. Best regards, |
September 3, 2023 at 12:15 pm #14331777 | |
victorN-3 |
Salamat Osama, Your starting point is from English language, but if you start from the Dutch language then you will see the issue. So ake a product in dutch translate it and then go to woocommerce multilingual products and filter sashimi. Even without creating a new product just search sashimi and you will get all the products (you will see that the products that you cannot see in filter are all originating in the dutch language). |
September 3, 2023 at 1:06 pm #14331899 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for your update. I've consulted our 2nd tier support regarding this issue and will update you as soon as I get their reply. Best regards, |
September 5, 2023 at 7:29 am #14340365 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for your patience. Our 2nd tier support team has found a workaround for the issue. Please check the following steps: 1- Edit wp-content\plugins\woocommerce-multilingual\inc\template-classes\class-wcml-products-ui.php if ( $category ) { $sql .= ' AND tx.term_taxonomy_id = %d '; $prepare_arg[] = $category; } With if ( $category ) { if (empty($slang)) { $cat_translations = apply_filters( 'wpml_get_element_translations', [], apply_filters( 'wpml_element_trid', false, $category, 'tax_product_cat'), 'tax_product_cat'); $cat_ids = wpml_prepare_in(array_column($cat_translations, 'element_id'), '%s'); $sql .= ' AND tx.term_taxonomy_id IN (' . $cat_ids . ') '; } else { $sql .= ' AND tx.term_taxonomy_id = %d '; $prepare_arg[] = $category; } } I've applied the above steps on the staging site. Please check it and let me know if it works correctly. (hidden link) Best regards, |
September 6, 2023 at 12:19 pm #14352207 | |
victorN-3 |
Hey Osama, thanks for the solution in worked, my remaining question is will this be implemented an update? I am afraid that after an update this code will disappear. What is your take on that? Cheers, |
September 6, 2023 at 12:21 pm #14352217 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi Vic, It's great to hear that the issue is fixed. I'm not sure if this fix will be added to the next release, but our Dev team is aware of the issue, and they will fix it in a future release. Best regards, |
September 6, 2023 at 3:41 pm #14353899 | |
victorN-3 |
Thanks Osama |