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

Lalo Martins lalo@laranja.org
Thu, 28 Mar 2002 08:36:50 -0300


On Thu, Mar 28, 2002 at 11:17:21AM +0000, Chris Withers wrote:
> Lalo Martins wrote:
> > 
> > > Gimme some examples, 'cos I don't really believe you ;-)
> > 
> > Easy. Go to plone.org or cmf.zope.org, log in, then bring up 404.
> 
> I suspect cmf.zope.rog is badly set up and I don't haeva login for plone.org. What's the
> poibnt you're trying to make?

You asked.

> > > > - it always renders as Anonymous, for example.
> > >
> > > Hmmm... that kinda makes sense though, if something barfs, do you really want to
> > > be logged in?
> > 
> > Yes.
> > 
> > First, for consistence.
> 
> *shrugs* Errors are never consistent...

Why? They can be. They are, with my (quite simple) patch. And
hitting an address where an object doesn't exist isn't
necessarily an error, as proven by some wiki implementations and
the existence of the NullResource class.

> > Second, my use case is a wiki-like setup, where the 404 page
> > offers a list of types to create if the user has the right
> > permissions. Of course, that doesn't work if request isn't right.
> 
> 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).

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

> > > > Actually, Zope2 error handling is way broken and I don't think
> > > > I'm the man to fix it.
> 
> Urm, what did you expect?! I think you ask to much of error handling, especially given
> your usecase is quite easily solved without all this hassle...

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.

Now you're being confrontational for no reason.

[]s,
                                               |alo
                                               +----
--
  It doesn't bother me that people say things like
   "you'll never get anywhere with this attitude".
   In a few decades, it will make a good paragraph
      in my biography. You know, for a laugh.
--
http://www.laranja.org/                mailto:lalo@laranja.org
         pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)      ---       http://www.BroDar.org/
Python Foundry Guide http://www.sf.net/foundry/python-foundry/