[wp-trac] [WordPress Trac] #13459: Conflict between post and page slugs/permalinks when permalink setting is set to /%postname%/

WordPress Trac noreply at wordpress.org
Sun Jan 27 23:13:25 UTC 2013


#13459: Conflict between post and page slugs/permalinks when permalink setting is
set to /%postname%/
--------------------------------------+-----------------------------
 Reporter:  jamescollins              |       Owner:  ryan
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  Permalinks                |     Version:  2.9.2
 Severity:  normal                    |  Resolution:
 Keywords:  needs-patch dev-feedback  |
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch => needs-patch dev-feedback


Comment:

 `wp_unique_post_slug()` returns a unique slug within the given post type.

 Seems like we have 3 options:
 1. Always prevent posts, pages (and CPTs?) from having the same slug
 (require unique slugs across all post types). Since having the same slug
 is actually fine with most permalink structures, this sounds like an
 unnecessary restriction.
 2. Only do the above for the `/%postname%/` permalink structure. However,
 if the structure changes to `/%postname%/` later (after the page and the
 post are created), we'll still end up with a conflict.
 3. Leave this to a plugin, since `wp_unique_post_slug()` is filterable
 (#14111).

 I personally think that the permalink conflict is to be expected in this
 case, so the 3rd option sounds acceptable to me.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13459#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list