[wp-trac] [WordPress Trac] #35031: wp_old_slug_redirect() in 4.4 redirecting existing posts
WordPress Trac
noreply at wordpress.org
Wed Dec 16 04:45:10 UTC 2015
#35031: wp_old_slug_redirect() in 4.4 redirecting existing posts
-------------------------------------------------+-------------------------
Reporter: douglsmith | Owner: pento
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.4.1
Component: Query | Version: 4.4
Severity: critical | Resolution:
Keywords: has-patch needs-unit-tests needs- | Focuses:
testing |
-------------------------------------------------+-------------------------
Comment (by pento):
This is so that old links don't break, if the slug is changed.
For example:
* The owner of example.com posts example.com/my-psot/
* That post is linked to from Reddit, giving them lots of traffic.
* They realise there's a typo in the slug! They want to rename it, but
they don't want their visitors to get a 404.
* When they rename it, WordPress stores the old slug in `_wp_old_slug`. If
people try to visit the old URL, they'll be quietly redirected to the new
one.
This behaviour has existed in WordPress since 2.1. The bug in this ticket
is if a post slug is changed, then a new post is created with the old
slug, it still redirects, instead of stopping at the new post.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35031#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list