[wp-trac] [WordPress Trac] #35368: Permalink structure not updating

WordPress Trac noreply at wordpress.org
Fri Jan 8 12:18:23 UTC 2016


#35368: Permalink structure not updating
--------------------------+--------------------
 Reporter:  jerome281     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.5
Component:  Permalinks    |     Version:  4.4.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+--------------------
Changes (by swissspidy):

 * keywords:  reporter-feedback => has-patch
 * milestone:  Awaiting Review => 4.5


Comment:

 Replying to [comment:2 jerome281]:
 > The page was not published but save as draft.
 >
 > Following this example /parent-page/child-page/grand-child-page/
 >
 > Let say create a page call "test" and select parent page "child-page"
 the permalink update to domain.com/parent-page/test instead of domain.com
 /parent-page/child-page/test
 >
 > I hope it make more sense now.

 Thanks. I know can reproduce and confirm this.

 Not sure if this was caused by #35084, but it doesn't look like it. It
 seems to me the bug is that `$page->post_name` is empty in
 `get_page_uri()` because it gets reset when calling `get_post()`. The URI
 gets set to `parent-page/child-page/`, but `get_sample_permalink()` strips
 off `/child-page`.

 [attachment:35368.diff] fixes the issue.

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


More information about the wp-trac mailing list