[wp-trac] [WordPress Trac] #26712: Two separate hierarchical CPT's can't have a top-level post with the same slug

WordPress Trac noreply at wordpress.org
Tue Dec 24 14:46:32 UTC 2013


#26712: Two separate hierarchical CPT's can't have a top-level post with the same
slug
--------------------------+-----------------------------
 Reporter:  jfarthing84   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.8
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 If you create two separate, non-hierarchical post types, you can create a
 top-level post within both of them with the exact same slug. Yet, if you
 have two separate hierarchical post types, you can't.

 The problem is when it is hierarchical, {{{wp_unique_post_slug}}} also
 takes into consideration the post parent. Of course, two top-level posts
 would both have a post parent of 0.

 I understand that the post parent should be checked for child posts as
 they are under their parent's "tree". However, if there is no post parent,
 shouldn't that part be left out of the check query?

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26712>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list