[Resolved] Category shows double products, in different languages
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing an issue where product categories were showing duplicate products in different languages, alternating between German (DE) and English (EN), despite not being new products and having worked correctly for many years.
Solution: We identified that the issue might be due to a conflict with cache settings, specifically involving the Redis cache and the Breeze plugin with Varnish cache configured. We recommended the following steps: 1. Disable the Redis cache or configure it properly. 2. Disable the Varnish cache or configure it properly. As a workaround, we suggested changing the Product Category slug for the German version from
ktm-250-exc
to
ktm-250-exc-de
and then clearing the caches to see if the issue persists.
If the solution provided here is not relevant to your case, because it might be outdated or not applicable, we highly recommend checking related known issues at https://wpml.org/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 still exists, please open a new support ticket at our support forum.
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.
I am trying to:
Some of our product categories are showing duplicate products and those products are in different languages, alternating between German (DE) and English (EN)
Link to a page where the issue can be seen:
English – hidden link
German – hidden link
I expected to see:
Not a mixture of different product languages
An example is the US translation which has all the products go to the US version of the products and are not duplicated: hidden link
Welcome to the WPML support forum. I will do my best to help you to resolve the issue.
Please try the following steps after a full site backup{mandatory} and make sure the issue exists or not.
1) Upgrade WooCommerce Multilingual & Multicurrency to the latest version(5.3.4)
2) Visit WooCommerce>>WooCommerce Multilingual & Multicurrency
3) Select *Product Categories* tab
4) Click on the Sync button on the bottom of the screen and wait until the process complete
5) Clear all types of caches
An aside: the Sync button did not seem to show, for some reason it had a 'display:none' style applied to it.
I did the sync, which seems to never show progress so I left it for 45 minutes and refreshed the affected page example.
For the English page it showed no products.
For German it showed products without a mixture of EN and DE.
I cleared the cache, nothing would make the EN products show.
I tried the Product Category sync again, that did not seem to restore the products.
I had to use the 'Synchronize post taxonomies' in the Troubleshooter, which if anything, made the situation worse, it showed fewer products in many other categories.
I have had to restore the from the backup.
I think in short the suggestion is not a proper solution.
Thank you for the feedback. In normal cases, Sync Product Categories will help to resolve issues like this. Have you made any major changes in the website recently like migration from one server to another?
One request. Please share with us the WordPress debug.log(not WPML debug information) to collect more details on this. Refer to these pages for instructions
To enable the WordPress Debug log, open your wp-config.php file of site root and look for define('WP_DEBUG', false);. Change it to:
// Enable WP_DEBUG mode
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 );
In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check if you are getting any errors or warnings related to WPML in the log file.
If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).
So we tried the steps that you mentioned above on a staging site and we can't replicate the initial problem reported in order to send you any debug logs.
We then created a new clone of the website and the problem was not showing on the copied version either so we then pushed the database of the cloned version to the live website and this didn't fix it.
The problem is only on the live website.
Does this help in any way to see/understand what is happening?
Thank you for the updates. This looks like a strange issue. Do you have any server-side cache settings?
Just to make sure, have you recently migrated from the staging site to the live site?
Please try the following troubleshooting steps after a full site backup{mandatory} and make sure the issue exists or not.
1) Deactivate all the WPML plugins
2) Activate WPML Core plugin, then the add-ons one by one
3) Go to WPML>>Support page, click on the Troubleshooting link (blue link in the middle of the page)
4) On the Troubleshooting page, please click on the following options in the *Clean up* section. Wait for confirmation of processing after each one.
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Cleanup and optimize string tables
Thank you for the updates. While doing WPML Troubleshooting steps, please try the *Synchronize posts taxonomies* option also. Refer to the attached image for more details.
I have completed the steps you mention above about disabling the plugins and activating them after and all the options you mention on the clean up section including "Synchronize posts taxonomies" like the screenshot, but this didnt fix the problem.
I created the debug log as well and there are no mentions of "wpml" on the record. I would send you a copy of it but there are too many lines inside it and pastebin stops working
Thank you for the feedback. Can you please create a new staging site(a clone of a live site)? Because this requires further debugging. A staging/dev site will help us troubleshoot the bug without affecting the live site.
--
Thanks!
Bigul
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.