[Zope-CMF] standard_error_message/404 nightmares (Re: 1.3 roadmap)

Chris Withers chrisw@nipltd.com
Thu, 28 Mar 2002 12:18:31 +0000


Lalo Martins wrote:
> 
> > *shrugs* Errors are never consistent...
> 
> Why? They can be. They are, with my (quite simple) patch. 

No, NotFound's are just handled differently with your hack ;-)

> > So why not just have your standard_error_messsage redirect to another page if the error is
> > a 404 where the user can add these types?
> 
> That was my first approach, yes, but request.RESPONSE in
> standard_error_message is broken and can't redirect for some
> reason (I suspect it's a fake response object).

WRONG! ;-) 

There's even a very good How-To for all this:
http://www.zope.org/Members/JohnC/StandardErrorMessage

You missed out the lock=1 parameter.

You are too suspicious sometimes ;-)

> Also, it's not easy to find out what was the offending id.

error_value is more than likely going to contain what you're looking for ;-)

> What hassle? It's a simple fix, and it is consistent with CMF
> and with the way traversal is done in most situations currently
> (via OFS.Application.__bobo_traverse__) if I understood it
> correctly.

Nah, a traversal hack to get around missing pages is pretty evil in my books.

> Now you're being confrontational for no reason.

I thought people knew that about me already *grinz*

Nothing meant by it, promise :-)

Chris