[Resolved] 404 error on Spanish product category pages.
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing 404 errors on Spanish product category pages on a multilingual site using WPML, despite the products being visible and unique slugs for categories being set. The default language was Dutch, and the issue persisted even after re-saving permalinks and disabling caching/SEO plugins. Solution: We identified that the issue was due to the client setting a custom base but using a different shop slug. We recommended using the original shop page slug 'winkel' and the regular WooCommerce permalink setting 'Shop base with category'. We adjusted the permalink settings from Settings > Permalinks to resolve the issue. After making these changes, the Spanish product pages began to display correctly.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, 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 problems persist, please open a new support ticket at WPML support forum for further assistance.
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.
Background of the issue:
I am running a multilingual site with WPML. The products are visible in Spanish, but when I click on a Spanish product category (for example /es/categoria-producto/...), I get a 404 error. Dutch is set as the default language. Slugs for categories in Spanish are unique and not duplicated. I have already tested re-saving permalinks and disabling caching/SEO plugins, but the issue persists. My goal is for Spanish product category pages to display normally, just like in Dutch and English. I have followed the WPML documentation on taxonomy translation and checked the category slugs. Despite following this, the issue remains. Link to a page where the issue can be seen: hidden link. I expected to see: Link die wel werkt: hidden link. Instead, I got: hidden link
Symptoms:
404 error on Spanish product category pages.
Questions:
Why am I getting a 404 error on Spanish product category pages?
How can I resolve the 404 error for Spanish product categories?
I checked and it seems something was blocking the save of slugs, could be security plugin, hosting firewall or custom code.
I am not sure, since now it works fine in staging site:
- hidden link
What I have done, is switched to WP default theme, disabled all plugins except for WPML plugins and WooCommerce. Went to WooCommerce Multilingual & Multicurrency > Store URLs > Clicked pencil for ES for product-categorie and just clicked saved and it works fine now.
Hi I tried it and indeed the menu items are working but now I get the 404 error code when you click on a product page. Is there a possibility for you check if we can solve this?
As I am not familiar with your website, please share more information of your steps and URL where such issue happens? Did you try same steps and resaved other store slugs?
When you for instance click on one of the now appearing categories you see several products that fall within that category. When you click on one of those categories the 404 error code appears again.
I will now again install a WP basis theme de-active the not necessary plugins and do the same steps of saving links of products to see if this works. give me a minute
Unfortunately this did not work, in the screenshot you can see the products that fall within one of the categories. If you click on a random product the 404 error code appears again.
Now I see the problem, on the staging website the products appear when you click on them, while in the 'real' website this is not the case, so I can not sent you a link of the problem on the staging website only on the actual one: