[wp-trac] [WordPress Trac] #12327: Draft pages do not show parent pages in prospective URL

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 9 20:50:41 UTC 2010


#12327: Draft pages do not show parent pages in prospective URL
--------------------------+-------------------------------------------------
 Reporter:  markjaquith   |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  3.0      
Component:  Editor        |     Version:  3.0      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
Changes (by duck_):

  * keywords:  slug, url, page, editor, wp-admin => has-patch


Comment:

 get_page_uri (wp-includes/post.php, line 2910) is passed a page id and
 retrieves this page from DB, this retrieved page doesn't have post_name
 set if it's a draft. Hierarchy handling in get_sample_permalink (wp-
 admin/includes/post.php) assumes that the last part of the returned uri is
 the page's name, so the last portion of the parent path is replaced with
 %pagename%.

 Fix allows get_page_uri to accept post object so that the temporary
 post_name set in get_sample_permalink can be used.

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


More information about the wp-trac mailing list