[Zope-dev] Re: FW: [Support] [ZOPE Collector] Zope Bug entry: Ghost ZClasses

Shane Hathaway shane@digicool.com
Fri, 13 Oct 2000 16:02:55 -0400


Brian Lloyd wrote:
> > A new bug entry was added with the following information:
> >
> > Title:  Ghost ZClasses
> >
> > At: http://classic.zope.org:8080/Collector/1676/sview
> >
> > Submitter:  lalo
> >
> > Email:  lalo@hackandroll.org
> >
> > Description:  Some ZClasses in a ZODB migrated from 2.1.6 did not
> > handle the migration well. Their instances were reported as
> > broken, till I removed the Product, when the instances started
> > working (but with no icon, factory or constructor).

I would have to guess that the cause may be a product that was supplying
a base class wasn't installed.

> > I tried flushing the cache, packing the database and restarting
> > Zope, to no avail. Then I found there was a global registry for
> > ZClasses; looks like somehow, when the classes were deleted, they
> > didn't _unregister().
> >
> > I finally tired of not being able to create banners and manually
> > removed the classes (via Python) from root()['ZGlobals']. Not
> > that this is a fix, but it's something other people with the same
> > problem can do if they're brave (insane?) enough.

This is actually expected behavior: if the ZClass itself is broken, Zope
can't even figure out what class ID it was supplying.  ZClasses break
when the base classes disappear.  At that point, there's no way to
unregister from ZGlobals.

This is a Hard Problem.  At the moment the only way I see fixing it is a
big change to ZClasses.

Shane