[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 02:08:37 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:4 miqrogroove]:
 > "Sorry, but there aren't any posts in the term1 category yet."
 >
 > That is the ONLY content being displayed other than the headers and
 footers.  That is a not found condition, and that is exactly what the 404
 status is used for.

 The conditions appropriate for a 404 response are defined in the
 [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html HTTP RFC]: "The
 server has not found anything matching the Request-URI."

 In contrast, when you query an empty category the server ''does'' find
 something: that category's page.  In WordPress '''categories can be
 empty'''.  Hence, they can exist and be found by the server, even when
 they do not contain posts.  Therefore the current behavior is not a bug
 and this ticket is invalid.

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


More information about the wp-trac mailing list