[wp-trac] [WordPress Trac] #4328: Redirect Old Slugs feature needs to redirect slugs for pages, not just posts, and redirect old permalink structure

WordPress Trac noreply at wordpress.org
Tue Apr 2 13:28:29 UTC 2019


#4328: Redirect Old Slugs feature needs to redirect slugs for pages, not just
posts, and redirect old permalink structure
------------------------------------------+-----------------------------
 Reporter:  Denis-de-Bernardy             |       Owner:  SergeyBiryukov
     Type:  enhancement                   |      Status:  reviewing
 Priority:  normal                        |   Milestone:  Future Release
Component:  Canonical                     |     Version:  2.2
 Severity:  normal                        |  Resolution:
 Keywords:  needs-unit-tests needs-patch  |     Focuses:
------------------------------------------+-----------------------------

Comment (by skorasaurus):

 This ticket's original description is from 12 years ago and WordPress has
 changed since then and what was in the original description is no longer
 applicable.

 WordPress will redirect to the intended page from its old url to its new
 url in the following scenarios:

 I've only (manually) tested this on the post_type of 'page' and when the
 permalink setting (wp-admin/options-permalink.php) is set to post-name.

 when the slug is changed;
 when a page has a changed parent page
 when the parent's page slug is changed.
 when a parent page is added.
 when its parent page is made to have another parent page.

 The only scenario that I had found to not work and what made me find this
 ticket in the first place:

 is that redirects will not work as expected when is when a page is added
 to have a 3rd level parent page.

 For example, a page with the slug of "3d-printing" and has two levels of
 parent pages (so its full url is: "subjects/technology/3d-printing/" is
 made to have a 3rd parent page (the new url is
 "library/subjects/technology/3d-printing/") ;
 the redirect will not occur, and the user receives a 404.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/4328#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list