Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.75k stars 886 forks source link

Category Slugs Become Case-Sensitive When "Show the Categories Prefix in the Slug" is Unchecked #21395

Open hillelstoler opened 3 months ago

hillelstoler commented 3 months ago

Please give us a description of what happened

When I uncheck the "Show the categories prefix in the slug" option in Yoast SEO (Yoast > Settings > Categories & Tags > Categories > Additional settings), the category slugs become case-sensitive (this is not normal for WordPress slugs).

For example, /tokyo/ works, but /TOkyo/ results in a 404 error, or category 'Abcdefg' would show correctly at mydomain.com/abcdefg/, but mydomain.com/ABCDEFG/ will either 404 or navigate to a different page (that has 'Abcdefg' in the title).

To Reproduce

Step-by-step reproduction instructions

  1. Uncheck the "Show the categories prefix in the slug" option in Yoast SEO
  2. Navigate to a category page
  3. Try the same URL with all-caps

Expected results

  1. All case variations of the slug should navigate to the category page (like the default WordPress behavior)

Actual results

  1. Lowercase only slug navigated correctly
  2. Mixed/Uppercase slugs navigate elsewhere (either 404, or redirected by WordPress)

Screenshots, screen recording, code snippet

If possible, please provide a screenshot, a screen recording, or a code snippet which demonstrates the bug. image

Technical info

Used versions

laurasacco commented 3 months ago

Please inform the customer of conversation # 1136109 when this conversation has been closed.