[Zope] clipboard pb

francois francois.cauchois at adp3i.fr
Tue Jan 20 11:47:00 EST 2004


hello,
I got a problem with copy container support.
I'm trying to use manage_copyObjects() and manage_pasteObjects() to migrate my 
old Zope member folders into new folders. 
I copied all content of the old folder, I created a new folder and I pasted 
the clipboard in. but my problem is, zope duplicate the object in the new 
folder : for example if i got a file object with 'zz'  id in the first 
folder , Zope give me in the new folder : 'zz' .. and 'copy_of_zz'.

Here is the script:

types_containers = { 'News Item':'News','File':'Documents','Link':'Bookmarks'}
 		# because i classified objects in differents folders
names_containers =  types_containers.values()
for n in names_containers:
    rep = '%s-new' % n
    old = getattr(homeFolder, n)
    new = getattr(homeFolder,  rep)
    items = [n  for n, o in old.objectItems()]
    cp = old.manage_copyObjects(ids=items)
    new.manage_pasteObjects(cp)


in fact, if I use the cookie and the request, I got the right result...  but, 
I want to understand what on earth going bad ... I would not want to apply 
this migrate script and later realize I get lot of problems or i have lost 
some objects ... !



help please 




More information about the Zope mailing list