Home›Support›English Support›[Waiting for user feedback] all product categories in one language ends up in 404 error
[Waiting for user feedback] all product categories in one language ends up in 404 error
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.
Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
<b>Background of the issue: </b>
I have a site with the default language set to IT and additional languages CN and EN. I don't need to translate the product, so I use 'duplicate' or 'fall back to default if not translated'. Everything in IT works fine, and EN works fine for product pages and category pages. However, in CN, product pages work, but all category pages end up in a 404 error. In product category -> Hierarchy Synchronization -> The taxonomy hierarchy is already synchronized. I notice that the category URL is under Italian, while the English language shows English in the URI structure. According to the setting, CN and EN should both use 'product-category', while IT uses 'categoria-produtto'.
I just noticed , it seems for a product/category I manually translated , the category link in breadcrumb shows like "/?product_cat=XXX&lang=zh-hans"
this type links works
<b>Symptoms: </b>
In CN, any and all category pages end up in a 404 error.
<b>Questions: </b>
Why do category pages in CN end up in a 404 error?
Why is the category URL under Italian for CN when it should use 'product-category'?
I browsed your site and can see the problem with 404 in Chinese categories, while the category base slug (categoria-prodotto) with both English and Chinese.
Before proceeding further, may I ask you to check and try the following please?
- Go to WP Settings -> Permalinks and see if the base slugs are correctly set for default language.
- Check for their translations.
- Also check in WPML -> String Translation for the correct translations.
If all's fine, then please proceed with the following:
Take a full backup of your site and database before proceeding. It is highly advised to try these on a dev or staging site first, so your live site isn't compromised.
1) Try these WPML and WCML Troubleshooting options and see if these help fixing the issue. If they don't then please continue with the following.
2) Deactivate all plugins except WPML, String Translation, WooCommerce and WCML.
3) Switch to a standard theme like 2024 or 2021.
4) Check for the issue if it still happens.
5) Then start activating plugins one by one while keep checking for the issue. This way you 'll be able to pinpoint a conflict when & where it starts creating the problem.
6) If after activating all plugins you see that it still works fine, then switch to your theme and see if that's causing it.
Please let me know and I'll try my best to help you further on the matter.
Regards.
P.S.: I'll be off for the weekend and 'll be able to attend on Monday.
I configured this like twice or thrice , first time it works , then I restore the backup and try to set up it again from beginning , then I can not make it work anymore
or alternatively , how can I bulk translate all categories ?
Thank you for the updates. Yes that may happen. However if you still run into the same issue, please feel free to try the steps I mentioned in my previous message.
Unfortunately, there's no other way of translating categories or taxonomies in bulk, than assigning all to a single post/product and translate for once.