Background of the issue:
I manage custom categories for products in WPML. For instance, I have a category called 'characters'.
Symptoms:
The 'characters' category has duplicates in English, which also appear in the first language. When creating a product in the first language, I see two 'character A' categories, making it unclear which one to choose.
Questions:
Why are there duplicate categories?
Why do the duplicates appear even if not in English?
I understand the issue you're facing. Please note that if you’ve translated the product category using the WooCommerce Multilingual plugin, that category should only appear in the secondary language, not when creating the default product.
If you see the category from the secondary language while creating a product in the default language, it may be due to a category synchronization issue. Please try the following steps and check if they help in solving the issue.
- Please go to `WooCommerce > WooCommerce Multilingual > Category` tab
- Make sure that the category is translated and it has a unique slug.
- Scroll down and you'll see a button to Synchronize Attributes. Click on that and wait till the synchronization is completed.
- Go to WPML > Support > troubleshooting
- Click on the following buttons:-
-- Synchronize posts taxonomies [Select 'Product' from the dropdown and then click the button]
-- Clear the cache in WPML
-- Assign translation status to duplicated content
-- Set language information
-- Fix post type assignment for translations
Once done, clear the caches from your site and browser and then try again.
Let me know if that helps or if you need further assistance in this matter. I will be happy to help.
thank you for your anwer, I didn't translate the product category with the WooCommerce Multilingual plugin, I only use WPML and I setted in the parameters to not translate my customs category but it seems it does it anyway.
There is always a "-en" attached.
I would like to try your solution but right now I opened another ticket because it seems there is an issue with this plugin "WooCommerce Multilingual" and WPML.
But if I never used WooCommerce Multilingual, does the problem can come from here?
Hi There,
Thank you for the update and for providing additional details.
If the custom category you're referring to is linked to WooCommerce, it's essential to keep the WooCommerce Multilingual plugin active and translate the category and other WooCommerce taxonomies through it. This ensures that the language information is correctly propagated with the translated taxonomies, allowing them to display properly across different languages.
Therefore, I recommend trying the suggestions I shared in my previous message, as they may help resolve the issue.
I see that you've also opened another ticket with WooCommerce Multilingual, which is a good step. Once the other issue is resolved, please try the solution I shared after that.
Feel free to let me know if you need further assistance or clarification. I will be happy to help.
Thank you for your messages, I'm now trying your method but I'm stuck early on :
- Please go to `WooCommerce > WooCommerce Multilingual > Category` tab
- Make sure that the category is translated and it has a unique slug.
I went in "Custom taxonom", and only one appears, but I have two more.
For the one that appear, I can't have a unique slug, when I try to put the same slug as in french, it always adds "en" or "en-2" for instance, see screenshot here : hidden link
If the terms do not appear in the Custom Taxonomy section, it may indicate that the taxonomies haven't been saved correctly or there could be issues with the taxonomy translation settings. Please try the following steps and check if you can see the taxonomies correctly.
- Navigate to WPML > Settings and scroll down to the Taxonomy Translation section.
- Ensure that the translation preference for your custom taxonomy is set to "Translatable - only show translated items."
- Next, go to the custom taxonomy you’ve created.
- Open the term that does not appear in the Custom Taxonomy section of WooCommerce Multilingual.
- Make a small edit to the term and save the changes.
Check if you see the term in the custom taxonomy section of WooCommerce Multilingual.
The issue you're facing, where slugs like "en" or "en-2" are automatically added, usually happens when the same slug is already assigned to another term in the same taxonomy (such as categories or tags) or to other content like posts or pages. WordPress requires slugs to be unique across the entire site to prevent conflicts. When you try to use the same slug for both the French and English versions, WPML attempts to make the slug unique for each language, which results in the language code being added to the slug.
If you use a different and unique slug for the English version, the language code will not be added to the slug.
I hope you can understand. Feel free to let me know if you need further assistance or clarification in this matter. I will be happy to help.
Thank you for your detailed answer Prosenjit, I'm sorry because I'm having a hard time understanding this...
I understood for the custom taxonomies, it's because I set them as "non translatable", because I don't want them to be translated, I want them to be the same across the two languages. For instance one is a taxonomy like "brands" so a brand is not translatable, it always have the same name.
So even if I want that, do I need to set them as "Translatable - only show translated items." ?
Hi There,
Thank you for the update. I’ll do my best to explain everything clearly and am happy to provide further clarification if needed.
Since your custom taxonomy, like "brands," doesn't need to be translated and should remain the same across both languages, you don’t need to set it as "Translatable - only show translated items."
Instead, you can keep it as "Non-translatable" in WPML settings. This way, the taxonomy will be the same in both languages, and there’s no need to create separate translations for it.
The "Translatable - only show translated items" option is useful when you want to translate terms and show different versions of the taxonomy in each language, but since you want "brands" to be consistent, leaving it as non-translatable is the correct choice.
However, with that setting, if you duplicate the taxonomy, consider adding an identifier to the duplicated taxonomy. This way, when selecting the taxonomy for a product, you can easily identify and choose the correct taxonomy.
I hope you can understand. Feel free to let me know if you need further assistance or clarification on this matter. I will be happy to help.
Best regards,
Prosenjit
The topic ‘[Closed] Duplicate categories’ is closed to new replies.
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.