Closed dawnbirth closed 4 years ago
Hello @dawnbirth
Thank you for reporting this issue, and thanks for the PR as well.
Upon further investigation, it seems that this is a problem in WP core, not in Rank Math. When I create a new category with a slug that has special characters in it (let's say áéíőű
, which will be encoded as %C3%A1%C3%A9%C3%AD%C5%91%C5%B1
) then example.com/category/áéíőű
will correctly open the category archive, however, example.com/category/ÁÉÍŐŰ
will NOT, it leads to a 404. This can be confusing because a category with the slug aeiou
will open correctly, no matter if we go to example.com/category/aeiou
or example.com/category/AEIOU
.
This is independent of Rank Math settings, and even of Rank Math being active or not. Because of this, we will probably not merge your PR.
In case we misunderstood the issue, please let us know the exact steps we need to take to reproduce it (including the arabic characters you tried it with, and their uppercase counterparts). Thank you.
Thank you for your reply,
With us, the issue doesn't occur when strip category base is off. Also, we newly migrated from Yoast to Rank Math and we faced this issue before with them and the suggested code edits are actually forked from Yoast SEO. Reference ticket from Yoast: https://github.com/Yoast/wordpress-seo/issues/8183
This issue was also reported by "Ivan Atanasov" on Rank Math support website: https://support.rankmath.com/ticket/problem-with-remove-category-base-feature/
Note: the case sensitivity I'm talking about is the encoded form of the special chars not the special chars in its decoded form.
Thank you for the clarification, now I could reproduce the issue. And your PR fixes it. We will probably include the same in an upcoming update.
Describe the bug Category URLs in which category slug is not Latin characters --like Arabic--, open as 404 not found page when the encoded part of the URL --encoded slug-- is converted to uppercase and "Strip Category Base" option is turned on.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Encoded forms of URLs should work the same when the encoded part is in its uppercase or lowercase form.