[wp-trac] [WordPress Trac] #29615: Non-Page Hierarchical Post Type 'Default Permalinks' do not work for child posts

WordPress Trac noreply at wordpress.org
Mon Sep 15 12:03:52 UTC 2014


#29615: Non-Page Hierarchical Post Type 'Default Permalinks' do not work for child
posts
----------------------------------------+--------------------
 Reporter:  loushou                     |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.0.1
Component:  Permalinks                  |     Version:  4.0
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+--------------------
Changes (by SergeyBiryukov):

 * milestone:  4.1 => 4.0.1


Comment:

 This appears to be a regression introduced in [28803] as a fix for #28611.
 I could not reproduce it in 3.9.

 With permalinks enabled, you'll get this structure after following the
 steps 1 to 4 in #28611:
 {{{
 http://trunk.wordpress/handbook/getting-started/
 http://trunk.wordpress/handbook/contributing-to-the-wordpress-codex/
 http://trunk.wordpress/handbook/contributing-to-the-wordpress-codex
 /getting-started/
 }}}
 With permalinks disabled, you'll get a conflicting permalink for the first
 and third post:
 {{{
 http://trunk.wordpress/?handbook=getting-started
 http://trunk.wordpress/?handbook=contributing-to-the-wordpress-codex
 http://trunk.wordpress/?handbook=getting-started
 }}}
 This part is not a regression, I can reproduce it in 3.0.

 Before [28803], when visiting that permalink, you would see both posts in
 a single post template.

 After [28803], you would only see the third (child) post. But when there
 is no child post with that slug, you would see no posts at all, so the fix
 was incomplete.

 With [attachment:link-template.php.diff], the permalinks are correct and
 work as expected:
 {{{
 http://trunk.wordpress/?handbook=getting-started
 http://trunk.wordpress/?handbook=contributing-to-the-wordpress-codex
 http://trunk.wordpress/?handbook=contributing-to-the-wordpress-codex
 /getting-started
 }}}

 Working on a unit test.

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


More information about the wp-trac mailing list