Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing 404 errors on product category pages in languages other than Dutch. The issue was due to incorrect URLs being generated for these categories, which also affected the menu links in these languages.

Solution:
We resolved the issue by adjusting the base slugs for each language. Here's how we did it:

1. We identified that the Dutch base slug was 'product-categorie' and the German one was 'produkt-kategorie'. For English, since the same slug as Dutch was initially used, we changed it to 'product-category' to avoid duplication.

2. We translated the category base slugs in WPML -> Taxonomy Translation and the default store URLs in WooCommerce -> WCML -> Store URLs.

3. We also addressed a problem with writing to the .htaccess file by creating a default .htaccess file using FTP.
After these adjustments, the URLs for the product categories were corrected across all languages, and the menu now reflects the correct URLs.

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 further assistance is needed, please open a new support ticket at WPML 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.

Tagged: 

This topic contains 4 replies, has 0 voices.

Last updated by tomv-24 3 days, 11 hours ago.

Assisted by: Waqas Bin Hasan.

Author Posts
July 24, 2025 at 12:12 pm #17267339

tomv-24

Background of the issue:
I am trying to have a working product category page in all languages. The issue can be seen at this link: hidden link. I expected to see: hidden link.

Symptoms:
I am getting a 404 error, but all 404s redirect to the homepage on this site. When I edit the product category on the backend and click on view category in the WP top bar, it goes to the wrong URL. This results in wrong menu links in all other languages than the default (Dutch).

Questions:
Why are product category pages in other languages giving 404 errors?
How can I fix the wrong URLs for product categories in languages other than Dutch?

July 24, 2025 at 12:26 pm #17267415

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Reference to our recent chat, I've moved to this ticket.

Please take your time and let me know your findings after checking on staging as requested.

Regards.

July 24, 2025 at 12:32 pm #17267491

tomv-24

I deactivated all plugins except the WPML ones, and switched to TwentyTwentyFour theme and the problem still exists.

The menu link is:
hidden link

But the url needs to be:
hidden link

July 24, 2025 at 1:57 pm #17267782

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates.

I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.

Your next answer will be private, to share this information safely.

Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.

IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

P.S.: If you don't see the section for providing access information, do not write in the message box or the information may appear as public.

P.S.: I'm just closing my day and 'll be able to check and update you tomorrow.

July 28, 2025 at 1:35 pm #17275428

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the access. I checked for the issue, however, I noted the following:

- The based slug for Dutch is "product-categorie" while for German it is product-kategorie. And the link hidden link is working fine.
- The same product-categorie was used for English. In WordPress same slugs are not permitted, so I changed English one to product-category.
- For the category base slugs, you can translate it in WPML -> Taxonomy Translation, as well as, for default store (base) URLs, you can translate these in WooCommerce -> WCML -> Store URLs.

So now these are working as expected:
- Dutch: hidden link
- German: hidden link
- English: hidden link

There are also problems writing to .htaccess. The current file contains a lot of code, while I need to check with the default one. There's also a notice about it in WordPress -> Settings -> Permalinks. I've used FTP to create a default .htaccess file.

Menu is also working fine and reflects the correct URLs. In short, there was only one problem of using duplicate base slugs (as mentioned above), correcting that fixed that 404 issue.

All images are also attached for references.

tax-trans-german.jpg
tax-trans-dutch.jpg
store-url-german.jpg
store-url-dutch.jpg
Screenshot 2025-07-28 165609.jpg
prod-cat-base.jpg
german.jpg
english.jpg
dutch.jpg
July 29, 2025 at 6:55 am #17277259

tomv-24

Hi Waqas,

I found the exact issue. I translated the product-category base through "WooCommerce -> WCML -> Store URLs" but this didn't solve the issue.

After looking at your printscreens i saw that you translated the bases through WPML -> Taxonomy translation -> Product categories. After setting the right translation on this place, it solved all issues.