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

seb bacon seb@jamkit.com
Sat, 23 Mar 2002 17:12:17 +0000


Lalo Martins wrote:
> 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?

Put it into CMFCore.PortalObject.PortalObjectBase instead.

You have all my support on this issue :-)

seb