Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug(s) in strip category base option #89

Closed
jrfnl opened this issue Jul 10, 2013 · 1 comment
Closed

Bug(s) in strip category base option #89

jrfnl opened this issue Jul 10, 2013 · 1 comment

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Jul 10, 2013

I haven't figured out completely yet what's going on and where it's going wrong, but there is definitely a (or several) bugs in the whole strip category base option handling.

Tested and observed on WP 3.5.2, virgin WP install with virgin WP SEO.
Theme TwentyTwelve, no other plugins active [note: no WPML!], but the Debug Bar with some add-ons.

Issue 1:
  1. Turn on category base
  2. Go to a category page => 404

Seems that this happens because the rewrite rules get deleted, but haven't been renewed yet. Saving Settings->Permalinks solves this.

Issue 2:

Next, once you have gotten rid of the 404.

  1. Turn off category base
  2. Go to a page where the category base was off => expected behaviour 'reverse redirect', i.e. redirect to category/term, observed behaviour: 404

It seems that the plugin does not account for users turning the option off and outside links still pointing to the category-base-stripped version of the url.

Issue 3:
  1. Manually add the word category to the url in the address bar & load => page redirects back to the category base stripped url resulting in 404

Similarly, it seems that this happens because the rewrite rules get deleted, but not renewed.

I haven't tested this in other WP versions, results may vary ;-)

Relevant files involved AFAICS:

  • wp-seo.php
  • inc/class-rewrite.php (only gets loaded when option turned, that might be part of the problem)
  • admin/class-admin.php

Issue #87 and issue #72 might be related to these bugs.

We might also want to have a look at the code of WP No Category Base - WPML compatible for inspiration.

Forum threads mentioning this (recurring or similar) issue - quite a large number can found, going back at least two years, amongst which:

@Rarst
Copy link
Contributor

Rarst commented Jul 12, 2015

The feature is planned to have major rewrite, see #2207. Closing older issues on topic as they will probably be better served by new implementation.

@Rarst Rarst closed this as completed Jul 12, 2015
seripap pushed a commit to seripap/wordpress-seo that referenced this issue Nov 19, 2015
hansjovis pushed a commit that referenced this issue Nov 21, 2022
Removed reference to configuring YoastCS as it's no longer necessary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants