[wp-trac] Re: [WordPress Trac] #7355: "next post" 404s when permalinks are set to "month and name" and a post has no name

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 25 17:18:39 GMT 2008


#7355: "next post" 404s when permalinks are set to "month and name" and a post has
no name
--------------------------------------------+-------------------------------
 Reporter:  mrmist                          |        Owner:  anonymous
     Type:  defect                          |       Status:  new      
 Priority:  normal                          |    Milestone:  2.7      
Component:  General                         |      Version:  2.6.1    
 Severity:  normal                          |   Resolution:           
 Keywords:  404, rewrite, permalinks, slug  |  
--------------------------------------------+-------------------------------
Changes (by aesqe):

  * keywords:  404 => 404, rewrite, permalinks, slug
  * version:  2.6 => 2.6.1

Comment:

 You will also get an 404 if a post is assigned to a child category and the
 slug contains numbers only.
 Trying to access it via lowest parent category will work, but nothing
 else.

 Permalink structure: /%category%/%postname%/

 Example:

 post slug: "123"
 posted in: "test" (a child category of "uncategorized" - category
 "uncategorized" is left unchecked)

 uncategorized/test/123 = 404
     $query == category_name=uncategorized&name=test&page=/123

 uncategorized/123      = OK
     $query == category_name=uncategorized&name=123&page=

 Obviously, it searches for page number 123 in the first case.

 Tested on 2.6.1, clean install, no plugins.

 IMHO, the rewrite rules don't necessarily need to be rewritten, but maybe
 some form of "checking" should be added.

 In this case, if page number 123 of post which has a slug 'test' and
 resides in category 'uncategorized' yields a 404, why not try if post with
 slug '123' exists in category 'test'? Why isn't there a "/page/" before
 the number anyway?

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


More information about the wp-trac mailing list