[wp-trac] [WordPress Trac] #13490: Permalinks Issues for Custom Post Types with Parents

WordPress Trac wp-trac at lists.automattic.com
Sun May 23 01:26:28 UTC 2010


#13490: Permalinks Issues for Custom Post Types with Parents
-------------------------------+--------------------------------------------
 Reporter:  mikeschinkel       |        Owner:            
     Type:  defect (bug)       |       Status:  closed    
 Priority:  normal             |    Milestone:            
Component:  Post Types         |      Version:  3.0       
 Severity:  normal             |   Resolution:  worksforme
 Keywords:  reporter-feedback  |  
-------------------------------+--------------------------------------------
Changes (by dd32):

  * status:  new => closed
  * resolution:  => worksforme
  * milestone:  Unassigned =>


Comment:

 The problem with this ticket, Is that you're not separating out the issues
 you're having.

 No. Custom post types default rewrite rules are not supposed to have
 post_type1/post_type2/post_type3, As you've done however, theres nothing
 stopping you manually adding a rewrite rule to achiece this.

 The reason the tokens are not being replaced in the url, is most likely
 because only one post is being requested, The post hierarchical code is
 for a SINGLE post type, as in post1/post2/post3, all of the same
 post_type, The same as pages in core, You cant mix them.

 Finally, Yes, The core rewrite code is limited in the URL's it can create
 and handle without a plugin/theme extending the rewrite rules, This is
 expected, it covers 99% of use-cases, and allows for authors to define
 their own. The system is limited in how it can parse urls, and as you
 know, theres another ticket for that.

 I cant follow the essay of this ticket to determine if there is actually
 any bugs i've not covered, Trac is for reporting issues, specific issues,
 You might be better off on wp-hackers for working out how to do some
 things.

 > Okay, yes it is possible to come around and add more rewrite rules but
 it's not possible (AFAICT) to assign a more complex rule using
 register_post_type()so we end up with vestigial rules in the list, and a
 long list of rules can be a performance drain for page load so I don't
 want to have excess rewrite rules that are never used.

 Set the rewrite arguement to false to prevent the default rules being
 created - Reading the register_post_type() function or its documentation
 will reveal this.

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


More information about the wp-trac mailing list