[Zope] Hairy problems deinstalling zfs???

Rik Hoekstra rik.hoekstra@inghist.nl
Fri, 11 Oct 2002 10:52:19 +0200


I'm going to include the Zope list in this. Perhaps other people can help, and 
who knows this may be of interest for others as well... Please reply to me 
directly as I am not on the Zope list anymore.

Below follows the mail exchange I had with Andy MacKay, followed by a final 
response from me. All in all it's a bit long, sorry for that.

Rik Hoekstra wrote:

 > Hi Andy,
 >
 > ZFS seems to 'infect' all zope objects once it's installed. Any idea how
this
 > can be undone, for example for exporting en importing objects from one
 > installation (with ZFS) to another (without ZFS)?
 >

And Andy McKay replied:
> If you uninstall it should work fine, there should be nothing broken and
> there shouldnt be any need to do that. Of course its put the_zfs parameter
> on all objects that are registered with zfs... hmm thats a pain actually I
> hadnt thought of.
> 
> The exporting, importing thing wouldn't work, you'd have to wite a quick
> script to change all the objects. Something like the following (untested
> External Method) should do. Warning this method will be a while if you have
> a large db:
> 
> def deinfect(self):
>     objs = self.ZopeFind(self, obj_metatypes=[], search_sub=1)
>     out = []
>     for name, obj in objs:
>         if hasattr(obj, '_zfs_path'):
>             delattr(obj, '_zfs_path')
>         out.append(obj.absolute_url(1) + ' changed')
>     return '\n'.join(out)
> 
> Hope that helps...
> 


thanks Andy, for your help. It didn't help, though :-(
The problem is that my objects complain they don't have a 
__before_publishing_traverse__ attribute after zfs has been removed. SOmehow the 
before_traverse method of the zfs hooks get registered with the objects (or the 
other way round), but for the life of me, I can't find out how this works or how 
to remove it...
The main problem is that direct traversal of my own objects is broken and the 
site is dependent on it at some crucial places. Now, I find this very hard to 
debug - poking in the dark with a black stick. sigh.

Rik Hoekstra