[Zope-dev] ZCatalog 'url' bug??

Bill Anderson bill.anderson@libc.org
Sat, 18 Dec 1999 11:27:42 -0700


Itamar Shtull-Trauring wrote:
> 
> David Kankiewicz wrote:
> 
> > create something that is CatalogAware, than have it index itself
> > "index_object" (when being created, inside a factory I think?), now
> > clear your catalog and use "Find Items to ZCatalog" to index the same
> > object. Lastly try to delete the object, Zope complains can't uncatalog
> > the object and it won't delete it.
> 
> This is in part because of unindex's EXTREMELY annoying behavior when you
> call it on uncataloged objects.
> 
> Unindex should simply *return* an error message if its called when the the
> object is already uncataloged - raising an error is very annoying in a lot
> of cases.  It  makes a lot more sense, too - at the end of the unidex I
> want  the object to be removed form the catalog.  Since it alreasy isn't in
> the catalog, unindex should just do nothing, not raise an exception!
> 
> This sould solve lots of problems I've had (I always change
> manage_beforeDelete in CatalogAware to do "try: self.unindex" to work around
> this), and for a lot of other people too.


FWIW, I have a short how-to on deleting uncatalogued objects that refuse
to be deleted normally:
http://www.zope.org/Members/Bill/Documentation/CatalogBadness

Bill

-- 
In flying I have learned that carelessness and overconfidence are 
usually far more dangerous than deliberately accepted risks. 
          -- Wilbur Wright in a letter to his father, September 1900