[wp-trac] [WordPress Trac] #11348: Archive Page Should be 404.php When !have_posts()

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 11 03:23:24 UTC 2010


#11348: Archive Page Should be 404.php When !have_posts()
--------------------------+-------------------------------------------------
 Reporter:  miqrogroove   |        Owner:  ryan    
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:  2.9     
Component:  Query         |      Version:  2.8.4   
 Severity:  normal        |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by filosofo):

 Replying to [comment:8 miqrogroove]:
 > filosofo, by your logic the server always finds index.php and should
 never use 404 for any reason.

 No.  The concept of [http://tools.ietf.org/html/rfc3986 "resource" is a
 logical one]; it has to do with data and data's relationship across the
 web.  Although

  * a garbage request string such as {{{/index.php?whatever=irrelevant-
 string}}} and
  * a blog post request such as {{{/index.php?post_id=1}}}

 both involve the "index.php" file, they differ semantically.  The first
 deserves a 404 response because its request doesn't map to a known
 resource; the second deserves something like a 200 because the request
 maps to a known resource (the blog post).

 ''The actual implementation files routing the query, such as index.php,
 are not part of the '''semantics''' of the query.''

 With your example of {{{/category/iamempty/}}} the query maps to a known,
 existing resource: namely, an empty category.  The ''meaning'' of the
 query  {{{/category/iamempty/}}} is that it requests the category named
 "iamempty."

 Because category "iamempty" exists, and the server has found it (the
 resource---the existing, empty category), returning a 404 in this case
 would go against the HTTP 404 definition.

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


More information about the wp-trac mailing list