[wp-trac] Re: [WordPress Trac] #7467: Pages with four digits do not get handled correctly.

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 20 22:45:17 GMT 2008


#7467: Pages with four digits do not get handled correctly.
-------------------------------------+--------------------------------------
 Reporter:  noel                     |        Owner:  anonymous
     Type:  defect                   |       Status:  new      
 Priority:  high                     |    Milestone:  2.7      
Component:  General                  |      Version:  2.6.1    
 Severity:  major                    |   Resolution:           
 Keywords:  permalinks, rewrite.php  |  
-------------------------------------+--------------------------------------
Changes (by fastpipe):

  * keywords:  => permalinks, rewrite.php
  * priority:  low => high
  * version:  => 2.6.1
  * severity:  normal => major

Comment:

 I haven't confirmed this with anything earlier or later than version 2.6
 (including 2.6.2).

 This isn't just a problem with pages and years, but also with any postname
 that is four digits and used as a permalink element. I'm converting a site
 from a custom system and decided to use the unique numeric ids from the
 existing system as the postname in the database rather than using a date
 based approach with some other postname Here is the permalink structure:

 /content/%postname%/

 Here are some example urls:

 {{{
 http://www.site.com/content/1/
 http://www.site.com/content/10/
 http://www.site.com/content/100/
 http://www.site.com/content/1000/
 http://www.site.com/content/10000/
 }}}

 All of those work correctly except the one with four digits where postname
 = 1000. I can use this URL ({{{http://www.site.com/?p=1000}}}) with
 permalinks turned off and it displays the correct post, but not the one
 using the custom permalink structure outlined above. Since I have about
 42K posts, that means that roughly 20 percent of them return 404 not found
 pages.

 It appears that the custom permalink structure I entered is being ignored
 in favor of providing a year-based permalink so...

 {{{http://www.site.com/content/1000/}}}

 ...doesn't work because I don't have any posts added in the year 1000.
 However, I do have posts from 2007 so this displays posts from the year
 2007...

 {{{http://www.site.com/content/2007/}}}

 ...not post ID 2007 (postname = 2007). I hope this gets resolved in the
 trunk and I might be able to do it myself if someone could point me in the
 right direction in rewrite.php.

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


More information about the wp-trac mailing list