[wp-trac] [WordPress Trac] #35031: wp_old_slug_redirect() in 4.4 redirecting existing posts
WordPress Trac
noreply at wordpress.org
Tue Dec 15 13:50:49 UTC 2015
#35031: wp_old_slug_redirect() in 4.4 redirecting existing posts
--------------------------+--------------------
Reporter: douglsmith | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4.1
Component: Query | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+--------------------
Comment (by SergeyBiryukov):
Replying to [ticket:35031 douglsmith]:
> I have not been able to recreate this condition by adding a new page,
changing the slug, then adding a new page at the original slug. Those
older pages had a `_wp_old_slug` custom field set with the original URL
but that is not being created as I move pages now. So this may only be an
issue for sites with older page moves.
`_wp_old_slug` is only added for non-hierarchical post types, see
[source:tags/4.4/src/wp-includes/post.php?marks=5191-5194#L5185
wp_check_for_changed_slugs()] and #4328.
I was able to reproduce the issue with posts:
1. Set the permalink structure to `/%postname%/`.
2. Create and publish a new post, "My Test".
3. Change its slug to `my-test-post`.
4. Create and publish a new post, "My Test".
5. The second post redirects to the first one.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35031#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list