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

Lalo Martins lalo@laranja.org
Wed, 20 Mar 2002 17:02:58 -0300


I was trying some tricks with Plone, standard_error_message and
NotFound, and, well, it almost ruined my sleep for the week. (I
couldn't issue a Redirect, I couldn't for dear life find the Id
of the missing object, I couldn't use a Python Script, and other
oddities that I find quite hard to explain.)

Zope2 exception handling is broken, we know that pretty
well. This should be fixed in Zope, obviously, but it's too
hairy and nobody wants to touch it, specially on the verge of
the Zope3 Age.

What I propose is that we provide a nicer hook for, at least,
NotFound, which should be handled gently on a portal. This
wouldn't be hard to do, a small change to the CMFSite class in
Portal.py using __bobo_traverse__ or something similar to what
Script.py does with __before_publishing_traverse__, then calling
a special skin template (not_found_error) and passing it the id
of the missing object.

However, this violates the following docstring:
    """
        The *only* function this class should have is to help in the setup
        of a new CMFSite.  It should not assist in the functionality at all.
    """

Can anyone propose a better design?

This one requires about 6 hours of work (2 or 3 Ideal Coding Hours
if you're into XP) and I'm willing to code it.

[]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/