[Zope-dev] robustness in management interface.

Jim Washington jwashin@vt.edu
Fri, 07 Feb 2003 08:16:35 -0500


Romain Slootmaekers wrote:

> Hi,
>
> The zope management interface has some robustness problems:
>
> whenever you call manage_workspace (the normal way of managing a 
> folder through the HTML Zope management interface) on a folder X, and 
> some object y in that folder gives an error (fi, it has no title 
> attribute, ) the whole folder becomes unmanageble. The only thing you 
> can do at that point is to manually delete the problematic object by 
> typing:
>
> http://..../X/manage_delObjects?ids=y
>
> It seems to me that an object in a folder should not interfere with 
> the management of the folder (at least, you should be able to throw 
> the object out of the folder)
>
>
> probably, a try/except or <dtml-try> in the right place fix this.


Or, you could assure that your objects all have titles (at least ="") if 
you want them managed through the ZMI.  I have not seen this as a 
*requirement*, but every example of a zope object I have seen uses 
self.title=aString in __init__().  

It is also important to have titles for most cataloging.  Do you catalog 
your site?  Is not title a good thing for searching?  Might you catalog 
in the future?

Perhaps something for a BestPractices document(?) or wiki(?):

"ZMI-manageable objects have a title attribute.  This is a string."

For a bit of context on the above, I put together a product that has 
title as a function (=[:30] of some content) some time ago.  I have been 
led to understand that this was a bad idea because it breaks some 
cataloging.

Your idea of <dtml-try> does have merit IMHO.  Should the ZMI really 
assume existence of anything other than "id" for objects?

-- Jim Washington