Skip to content Skip to sidebar

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

Problem:
The client was experiencing issues with the language switcher on their website, where clicking on the language switcher did not navigate to the correct translated product category pages but redirected to the main category page instead.
Solution:
We discovered that the issue was due to the use of duplicate slugs for the Shop page, Product base, and Product category base. To resolve this, we made the following changes:
- Changed the Shop page slug to 'shop'.
- Changed the Product category base to 'product-category'.
- Set the Product base to '/catalogue/%product_cat%/'.
After these adjustments, the language switcher correctly reflected the translated URLs. We also translated these changes into French and German. It is crucial to use unique slugs to avoid similar issues. Additionally, if slugs are changed, it is necessary to resave permalinks and flush all caches.

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 10 replies, has 1 voice.

Last updated by neringaP 3 days, 22 hours ago.

Assisted by: Waqas Bin Hasan.

Author Posts
August 27, 2025 at 10:47 am #17351426

neringaP

Background of the issue:
I'm trying to use the language switcher on my site hidden link to navigate between translated product category pages. For example, when I'm on the page hidden link and click on FR in the language switcher, I expect it to open hidden link, which is the direct translation of /catalogue/log-houses/. However, it opens /fr/catalogue/ instead.

Symptoms:
The language switcher does not correctly link to the translated product category pages. It redirects to the main category page instead of the specific translated category page.

Questions:
Why does the language switcher not link to the correct translated product category pages?
How can I configure WPML to ensure the language switcher links to the correct translated pages?

August 27, 2025 at 2:27 pm #17352287

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Hi,

Thank you for contacting the support.

Before proceeding further, I'll recommend fixing and trying 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) Update WordPress, WPML, WCML and WooCommerce to latest versions.
2) Deactivate all plugins except WPML, String Translation, WCML and WooCommerce.
3) Switch to a standard theme like 2024 or 2021.
4) Clear all caches, resave permalinks and 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 feel free to share your findings and I'll try my best to help you further on the matter.

Regards.

August 28, 2025 at 12:59 pm #17355138

neringaP

None of this helped. Why would lang switcher link to shop page, instead to category of other language? Categories are linked correctly.

August 29, 2025 at 4:41 am #17356642

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for trying those steps.

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.

August 29, 2025 at 12:49 pm #17358159

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for the updates, I was able to login into the site.

However, I see a lot of active plugins which are outdated. I'll need to deactivate these and retest accordingly. This may take some time.

Your patience and cooperation is highly appreciated.

P.S.: I'll be off over the weekend and 'll be able to attend on Monday.

September 1, 2025 at 5:19 am #17361141

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for your patience and cooperation. I'm just resuming work on it and 'll get back to you as soon as possible today.

September 1, 2025 at 10:27 am #17362049

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for your patience and cooperation.

I was able to dig deeper and found that there are several duplicate slugs are being used. For example, Shop page, Product base and Product category base were using the same slug (catalogue).

Please note that this isn't a WPML issue but a limitation by WordPress, where you can not use the duplicate slug, specially in Store URLs.

So I've corrected this as following:

- Shop page -> shop (i.e. Shop page -> hidden link).
- Product category base -> product-category (i.e. Log Houses -> hidden link).
- Product base -> /catalogue/%product_cat%/ (i.e. Cedar Cove -> hidden link).

Language switcher reflects correct translated URLs now (i.e. French):
- Shop Page: hidden link
- Log Houses category: hidden link
- Cedar Cove product: hidden link

As well as, have also translated these into French and German. This now works fine.

I understand that your desired slug or URLs may not be the same, so you can change these to more appropriate wordings (as needed). HOWEVER, please make sure to use unique slugs.

You may also need to correct the appropriate links used in the menus or elsewhere.

Whenever you change these slugs, remember to resave permalinks and flush all caches.

September 1, 2025 at 12:24 pm #17362467

neringaP

Thank you, I understand the issue now. But I had to restore it to where it was, used back up for it, now in other then original langs, I'm getting product pages as 404. Tried flushing permalinks, and everything, still same issue, could you check on it?

September 1, 2025 at 2:43 pm #17363264

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for your understanding.

Sure thing I can take a look, however I'll need access again because the previously provided access isn't working anymore.

I've enabled your next reply as private to provide updated access information.

P.S.: I'll be closing my day shortly and 'll be able to check in the morning.

September 2, 2025 at 1:05 pm #17366257

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for the updates, I am working on this and 'll get back to you as soon as I find something or have a solution.

September 3, 2025 at 6:13 am #17368161

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for your patience and cooperation.

I checked again and since you've restored the site from previous backup, all the slugs have been restored and these have come to the previous point - the duplicated slugs (watch the hidden link">screen recording for information).

Please correct the slugs to be unique among all the places, as mentioned in my previous reply and it should be fine.

September 3, 2025 at 8:45 am #17368761

neringaP

Thank you, all is clear now