[wp-hackers] Should Monthly Archive Pages ever return 404?

Paul paul at codehooligans.com
Mon Mar 9 19:03:21 GMT 2009


Mike,

Trying to understand your issue with the 404 returned. Correct me if  
I'm wrong. You really want the option to do something like the search  
results return of the query returned no hits? Which my understanding  
is not a 404.

Paul


On Mar 9, 2009, at 1:59 PM, Casey Bisson wrote:

>
> Are you arguing that the page shouldn't return a 404, or that WP  
> should implement some more elegant hooks to handle 404 conditions?
>
> You should take a look inside the WP_Query object. It's written to  
> parse every possible legal request URL, and if you hook into in the  
> right places, you'll also find opportunities to generate more useful  
> 404s when either the query parser fails or if the database returns  
> no results (as is the case with your example).
>
>
> --Casey
>
> http://maisonbisson.com
> http://scriblio.net
>
>
> On Mar 9, 2009, at 2:38 PM, Mike Schinkel wrote:
>
>> The problem with a "helpful 404 page" is that such a 404 page must  
>> know about all potential error states in a system to be helpful vs.  
>> allowing the pages that already know about "the error states" to  
>> take action.  It would seem to me a lot more appropriate for a page  
>> to be able to "punt" and say "Ya know, I consider this a 404" if it  
>> wants to trigger such a use case rather than having to modify the  
>> 404 for every potential error situation.
>
>
> On Mar 9, 2009, at 2:28 PM, Mike Schinkel wrote:
>
>> While I will certainly concede the point if most others feel it is  
>> semantically reasonable here are the two ways to look at it:
>>
>> 1.) The lack of posts imply there is no valid resource at the  
>> requested URI, or
>> 2.) The lack of posts is simply a reportable state for a valid  
>> resource at the requested URI.
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list