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
On Tue, Jan 20, 2004 at 05:47:00PM +0100, francois wrote:
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'.
That will happen if you run this script more than once. I didn't spot anything wrong with it. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's ULTRA GUY OF THE DEEP! (random hero from isometric.spaceninja.com)
participants (2)
-
francois -
Paul Winkler