Skip Navigation

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

Problem:
The client is experiencing an issue where the correct product categories are displayed on the Shop page in English, but when switching to German, all product categories are shown.
Solution:
We recommend the following troubleshooting steps:
1. Back up your site's database.
2. Navigate to WPML -> Support -> Troubleshooting.
3. On the troubleshooting screen, press the following buttons one at a time and wait for each process to complete:
-

Disable cache for language switcher templates

-

Clear language information and repopulate languages

(if available)
-

Synchronize posts taxonomies

for the relevant post type
-

Clear the cache in WPML

-

Remove ghost entries from the translation tables

-

Fix element_type collation

-

Fix WPML tables collation

-

Synchronize local job ids with ATE jobs

-

Synchronize translators and translation managers with ATE

-

Assign translation status to duplicated content

-

Set language information

-

Reset languages

(Only if you haven't added a custom language)
-

Fix terms count

-

Fix post type assignment for translations

-

Cleanup and optimize string tables

-

Clear invalid strings

*** Please ensure you have a database backup before proceeding.***
If these steps do not resolve the issue, please provide us with access to your site for further investigation. You can safely share your details with us following our Privacy and Security Policy.

If the solution provided here is not relevant to your case, because it might be outdated or not applicable, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket.

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 16 replies, has 4 voices.

Last updated by Itamar 3 weeks, 5 days ago.

Assisted by: Itamar.

Author Posts
March 21, 2024 at 7:36 am #15434546

ericH-23

In English (Standard) the right product categories are shown in Shop page but switching to German all products cats are shown

March 21, 2024 at 8:40 am #15434923

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Maybe you are facing this issue because of compatibility conflicts. So to make sure if possible, please do the following steps.

a) Create staging/dev site(clone copy of the live site)
b) Switch for a moment to a WordPress default theme like 2023
c) Deactivate all the plugins that are not related to WPML except WooCommerce
d) Then check whether the issue exists or not
e) If the issue is gone, activate the plugins as a group of three or four to find which one has an interaction issue
f) Switch back to the original theme of the site

--
Thanks!

Bigul

March 21, 2024 at 6:09 pm #15438027

ericH-23

Hi,
I tested further and have this question:
I don't have translated memberships because these are the base of restrictions and I don't want to add a seperate restriction for every language. By this I have the same english names in all languages, this is not nice but I have to live with this.

Now I have:
English standard: restriction of product categories is working
switching to anotger language: these restrictions don't work anymore, the product categories in another language are not restricted

In the backend in the membership settings I set the english names of the product categories (they are translated, sure) to the restrictions. That is so far ok, because I set up this fix (before thsi was not saved): https://wpml.org/errata/woocommerce-memberships-restrict-content-conditions-applies-to-all-pages-across-the-site/

Because the products, with which the membership is activated are shown in all languages, I try to add product categories for the restriction also in all languages, but they are not shown in the select box.

If I now change the language in the backend, I get a fatal error, the page is not shown. Ok, I don't activated the membership translation. But even if I enable to "Translatable
use translation if available or fallback to default language" the same error occurs.

So my question is: I see there are some fixes needed to cure problems here, it could be that a further fix is needed to add the translated product categories to membership restrictions.

Can you check this please? This is important, I cannot use the product categories restrictions in other languages.

Thanks, kind regards
Eric

premium membership.png
restricted product categories.png
backend switch to another language.png
March 24, 2024 at 2:04 am #15443586

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

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

Hello,

The error on your screenshot shows up because the content you are trying to edit is inside the trash bin.

Please recover the post from the trash folder or clear the trash folder if you do not need the translation.

---

Further, I would like to provide a WPML test site on which you can install WooCommerce Memberships and try to recreate the issue.

The following WooCommerce Memberships plugin is installed and I created a demo product.

hidden link

Would it be possible for you to complete this task and let us know if you can recreate the issue here?

One-Click-Login:
hidden link

Please do not migrate your whole website to this test site. We only need a simple example that replicates the issue.

Make sure to leave us a comment on this ticket once you are done with this task so that we can follow up with you.

---

Apart from that please take note that there is also the following known issue open:
https://wpml.org/errata/woocommerce-memberships-does-not-assign-membership-when-purchasing-a-product-in-a-secondary-language/

March 24, 2024 at 12:43 pm #15443827

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I'll continue to help you with this issue.

Please check the advice ( recover the post from the trash) Adreas, my colleague, provided and see if it helps to solve the problem. If it does not help, please proceed with replicating the issue on the test site and get back to us once you are done.

Regards,
Itamar.

March 26, 2024 at 4:36 pm #15452459

ericH-23

Hi,
Thanks for the very good support! I appreciate this much!
Unfortunaltely I have no trashed posts, memberships, products, product categories ...
Before I start to build up it new in the demo site let me please ask following:
I first don't want to translate the memberships, due to connected access rights (I have to add automations and access right to various pages and widgets separately per language).
In the meantime I see the translations of my site so working well that I think, it is worth to have even the membership names translated. It is much work, to have all in place, but by this the website is 100% translated with shop, products and memberships.
So now my question:
Shall I now translate the memberships and test then at the end of this process, whether I have still this problem? May be is gone if I translate all, what do you mean?
Thanks for your advice.
Kind regards
Eric

March 26, 2024 at 7:26 pm #15452999

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Eric.

You asked: "Shall I now translate the memberships and test then at the end of this process, whether I have still this problem? May be is gone if I translate all, what do you mean?"

Yes, in my mind, you should certainly try this.

If you need further help with this issue, please share your site's Debug information. You can read about it here.

http://wpml.org/faq/provide-debug-information-faster-support/

Regards,
Itamar.

March 27, 2024 at 7:49 am #15453746

ericH-23

Hi,
Thanks, so I wanted now translate the memberships. Here I have this situation:
The memberships show a translation + and if I uses this, the translation page is shown, but cannot be stored, here I get an 500 error. Please see the attached screenshot. Because wpml is also in the list, what can I do now?
Thanks, kind regards
Eric

Bildschirmfoto 2024-03-27 um 08.43.06.png
March 27, 2024 at 9:20 am #15454140

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Eric.

Here are two things you can try regarding the problem with saving the translations made with WPML's Classic Translation Editor.

A. I suspect that there is a collision with the theme or another plugin that might cause this problem. If possible, get your site into a minimum environment, switching to a default WordPress theme like TwentyTwenty-One and having no plugins activated except WPML.

First, you must check if the problem persists when just the theme is switched to TwentyTwenty-One (for example). If it persists, then deactivate all plugins except the WPML, its add-ons, WooCommerce itself, and only the WooCommerce Memberships plugin. Then please check if the problem persists. If it does not persist, start by activating the plugins one by one and check when the problem comes back, then report to me which plugin was the culprit.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****


*** If your site is a live site, you might want first to try those procedures in a staging environment or a snapshot of your site on your local server or another server. ***

B. Alternatively, you can check for PHP errors. 500 error is a general error. So, to check for more specific errors, please proceed like this. If the problem persists, please share WordPress's debug log (not WPML debug information). Please check this page for instructions.

https://wpml.org/documentation/support/debugging-wpml/

To enable it, open your wp-config.php file and look for

define('WP_DEBUG', false);

Change it to:

define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);

After this, repeat the action that causes the problem on your site - save the translation in the Classic Translation Editor. The errors will be saved to a debug.log log file inside the /wp-content/ directory. Then please share the errors with us.

Regards,
Itamar.

March 27, 2024 at 10:52 am #15454910

ericH-23

Hi,
Yes, thanks, in the debug is the error shown. How can I share this with you on a confidential base? Kind regards
Eric

March 27, 2024 at 11:49 am #15455282

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Eric.

I'm setting the reply to private, and you can share it there.

Regards,
Itamar.

March 27, 2024 at 5:49 pm #15457691

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Thanks.

I'm consulting our second-tier supporters about this case. I'll update you here once I have their reply.

Regards,
Itamar.

March 28, 2024 at 8:44 am #15459346

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Our second-tier supporter suggests you try WPML's troubleshooting section.

1. Take a backup of the DB of your site.

2. Go to WPML -> Support -> Troubleshooting (link)

3. Once on the troubleshooting screen, press the following buttons and check if it helps. Press each button at a time and wait for the process to complete.

- 'Disable cache for language switcher templates'

- 'Clear language information and repopulate languages' button (if it is showing)

- 'Synchronize posts taxonomies' for the relevant post type

- 'Clear the cache in WPML'

- 'Remove ghost entries from the translation tables'

- 'Fix element_type collation'

- 'Fix WPML tables collation'

- 'Synchronize local job ids with ATE jobs'

- 'Synchronize translators and translation managers with ATE'

- 'Assign translation status to duplicated content'

- 'Set language information'

- 'Reset languages' Press this button only if you didn't add a custom language!

- 'Fix terms count'

- 'Fix post type assignment for translations'

- 'Cleanup and optimize string tables'

- 'Clear invalid strings'

*** Please make a backup of your database before using this.***

If this does not help, please give me access to your site so I can continue to investigate the issue.

If you need further help with this, please share the access details to your site with me.
I'm enabling a private message for the following reply.

Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
**IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Thanks,
Itamar.

March 28, 2024 at 9:27 pm #15462671

ericH-23

Hi,
Thanks, I only want to let you know, that I first must solve an error of my staging process. This I need for make a copy of my site before I use your suggestions. So please let this ticket open. As soon I can go forward and have a result, I write it here.
Thanks, Happy Easterm, Kind regards
Eric

April 1, 2024 at 6:42 am #15468151

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Eric, and happy Easter.

I'll wait to hear from you if needed.

I'm activating a private message for the next reply.

Best Regards,
Itamar.

ericH-23 confirmed that the issue was resolved on 2024-04-01 10:59:34.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.