[wp-trac] [WordPress Trac] #17176: WP_Rewrite::page_uri_index() includes auto-drafts

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 19 14:50:37 UTC 2011


#17176: WP_Rewrite::page_uri_index() includes auto-drafts
---------------------------+-----------------------------
 Reporter:  duck_          |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Rewrite Rules  |    Version:
 Severity:  normal         |   Keywords:  has-patch
---------------------------+-----------------------------
 The query results passed to get_page_hierarchy() includes auto-drafts.
 This means that when verbose page rules are in use there are several
 useless rewrite rules created:

 {{{
 ()/trackback/?$ => index.php?pagename=$matches[1]&tb=1
 ()/feed/(feed|rdf|rss|rss2|atom)/?$ =>
 index.php?pagename=$matches[1]&feed=$matches[2]
 ()/(feed|rdf|rss|rss2|atom)/?$ =>
 index.php?pagename=$matches[1]&feed=$matches[2]
 ()/page/?([0-9]{1,})/?$ =>
 index.php?pagename=$matches[1]&paged=$matches[2]
 ()/comment-page-([0-9]{1,})/?$ =>
 index.php?pagename=$matches[1]&cpage=$matches[2]
 ()(/[0-9]+)?/?$ => index.php?pagename=$matches[1]&page=$matches[2]
 }}}

 Steps:

  1. Visit add new page to create an auto-draft
  2. Go to options-permalinks.php and enable a verbose structure

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


More information about the wp-trac mailing list