[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
Wed Dec 9 13:59:28 UTC 2015


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

Comment (by ericlewis):

 > Seems like `'/%postname%/' === $wp_rewrite->permalink_structure` won't
 catch a static prefix, e.g. '/blog/%postname%/'. Would that still cause a
 conflict if there's a 'Blog' page with subpages?
 > Perhaps the `preg_match()` check from [35679] could be used.

 We can drop this into our logic for looking up a unique slug for a post
 (`post_type = post`). This would be complex to use for page slugs, because
 that query ensures uniqueness is tied to diffferent post_parent levels /
 URL path hunks.

 Do you think that's a must-fix use-case for this issue, or an edge case?
 This is not the only collision of this flavor we will see, e.g.
 `%tax_base%/%tax_term%` collisions with a subpage.

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


More information about the wp-trac mailing list