Re: [Zope-dev] Something doesn't seem quite right with CopySupport.py/Moniker.py
-----Original Message----- From: Brian Lloyd <Brian@digicool.com> To: 'Kevin Dangoor' <kid@kendermedia.com>; zope-dev@zope.org <zope-dev@zope.org> Date: Tuesday, August 17, 1999 9:21 PM Subject: RE: [Zope-dev] Something doesn't seem quite right with CopySupport.py/Moniker.py
Is there something that I'm missing here? I didn't see any big difference between the management interface calling these routines and my python calling them...
Kevin,
I _think_ the problem is that the copy/paste machinery really needs to be called with a REQUEST so that it can verify whether the copy is allowed. Try this and let me know if you still have problems:
def candp(fobj, tobj, REQUEST): "Copy and paste"
ids = fobj.objectIds() if not ids: return cdata = fobj.manage_copyObjects(ids) tobj.manage_pasteObjects(cdata, REQUEST)
I made these changes, and modified my DTML to be: <dtml-call "candp(fobj, this(), REQUEST)"> I'm getting the same error (one or more items not found). Here's the end of the traceback... File C:\Program Files\Byproducts\lib\python\DocumentTemplate\DT_Util.py, line 315, in eval (Object: candp(fobj, this(), REQUEST)) File <string>, line 0, in ? File C:\Program Files\Byproducts\lib\python\Products\ExternalMethod\ExternalMethod.py, line 246, in __call__ (Object: candp) (Info: ((<Folder instance at 0168AF70>, <KMArticle instance at 01747F30>, [big REQUEST object deleted] File C:\Program Files\Byproducts\Extensions\art.py, line 28, in candp (Object: ElementWithAttributes) File C:\Program Files\Byproducts\lib\python\OFS\CopySupport.py, line 198, in manage_pasteObjects (Object: CatalogAware) Copy Error: (see above) Anything else to try? Kevin
participants (1)
-
Kevin Dangoor