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.
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
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
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.
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.
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
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.
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
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.
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.
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.--
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