Skip Navigation

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

Problem:
Why do the category links in the German menu redirect to the English category pages instead of the corresponding German pages? (when Rank Math SEO plugin is active).

Solution:
Problem was fixed by following this errata: https://wpml.org/errata/rank-math-seo-turning-on-strip-category-base-causes-issues-with-secondary-languages/

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 5 replies, has 2 voices.

Last updated by Waqas Bin Hasan 3 weeks, 6 days ago.

Assisted by: Waqas Bin Hasan.

Author Posts
May 23, 2024 at 11:05 am

sarahS-21

Background of the issue:
I am using the WPML plugin to manage multilingual content on my WordPress site, specifically for translating and linking categories and menu items between English and German. My default language is set to English, and I am trying to ensure that category links and menu synchronization function correctly across both languages.

Symptoms:
When I click on a German category link from the menu, it redirects to the English category page instead of the German one. Additionally, when synchronizing the menu between languages, the German categories do not appear in the German menu, and unwanted German menu items are added to the English menu, which I then have to manually remove.

Questions:
Why do the category links in the German menu redirect to the English category pages instead of the corresponding German pages?
Why does synchronizing the menu between languages cause unwanted German menu items to appear in the English menu, and why do the German categories not appear in the German menu after synchronization?

May 23, 2024 at 12:23 pm
May 23, 2024 at 1:15 pm #15663255

sarahS-21

I have a small update... Could it be possible that the following setting in RankMath is causing the problem:
Strip Category Base is active in Rank Math
Remove /category/ from category archive URLs. Why do this?
E.g. example.com/category/my-category/ becomes example.com/my-category

Which means all my English category links are displayed like this:
hidden link

instead of this:
hidden link

But in WPML the taxonomy translation for categories is set to: EN: category --> German: kategorie

PS The problem if I want to deactivate that feature with RankMath it gives me a warning, that it could potentially break the site

May 23, 2024 at 1:18 pm #15663266

Waqas Bin Hasan
Supporter

Languages: English (English )

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

That's probably quite possible, because I was just checking our Rank Math page and found some known issue reported by other users (https://wpml.org/plugin/rank-math-seo/ scroll down to find known issues section).

And there are some reported about these options. Please check and if possible carefully apply the solution(s) provided in the erratas.

Please let me know if any of these was helpful, or, I'll keep digging on my end.

May 23, 2024 at 1:28 pm #15663331

sarahS-21

Well I hardly guess that this is the issue, but sadly the workaround offered by WPML isn`t working for me as all the categories are already translated.... The workaround suggests not translating the slugs, but that was already done long time ago
So I really don`t know how to fix this

May 24, 2024 at 5:44 am #15665579

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for checking the errata and for the updates.

I'm working on it and 'll get back to you as soon as possible.

May 24, 2024 at 8:14 am #15666063

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for your patience and cooperation.

I was able to fix the problem by following this errata: https://wpml.org/errata/rank-math-seo-turning-on-strip-category-base-causes-issues-with-secondary-languages/

Since categories were already translated, so you don't need to un-translate these. Simply needed to turn off Strip Category Base option in Rank Math → General Settings and clear all caches.

Now hidden link redirects to its German translation hidden link correctly.

Please check and confirm.

Screenshot 2024-05-24 131207.jpg
May 24, 2024 at 1:02 pm #15667979

sarahS-21

Thank you so so much! Great service and help!

sarahS-21 confirmed that the issue was resolved on 2024-05-24 13:02:18.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.