[Zope] manage_cutObjects/manage_pasteObjects problem ...
Ajay Deshpande
riffenstein at gmail.com
Wed Jul 23 01:06:45 EDT 2008
Hi all:
Ive been trying to cut objects from one context and paste them into another
using a script python. But I get a "CopyError" when I try doing this. This
is my code snippet and the traceback ...
Snippet...
...
obj = context.restrictedTraverse(path)
obj_parent = obj.aq_inner.aq_parent
dest_folder = context.Dest # this is a folder object
copy_info = obj_parent.manage_cutObjects((context.getId()))
dest_folder.manage_pasteObjects(copy_info)
...
Traceback:
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module OFS.CopySupport, line 194, in manage_pasteObjects
Module OFS.CopySupport, line 527, in _verifyObjectPaste
Copy Error:
<HTML>
<HEAD>
<TITLE>Not Supported</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FORM ACTION="manage_main" METHOD="GET" >
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="10">
<TR>
<TD VALIGN="TOP">
<BR>
<CENTER><B><FONT SIZE="+6" COLOR="#77003B">!</FONT></B></CENTER>
</TD>
<TD VALIGN="TOP">
<BR><BR>
<CENTER>
The object <em>dtmij.txt</em> does not support this operation.
</CENTER>
</TD>
</TR>
<TR>
<TD VALIGN="TOP">
</TD>
<TD VALIGN="TOP">
<CENTER>
<INPUT TYPE="SUBMIT" VALUE=" Ok ">
</CENTER>
</TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>
....
I cannot perform this operation directly using the ZMI also. So it is not a
problem with the script. Some issue in CopySupport. I searched for the
resolution and found that CopySupport needs to be patched. But I couldnt
find the patch anywhere.
My Zope is 2.9.4-final, Python2.4.3.
Any help is greatly appreciated.
TIA,
Aj
"And the trees are all kept equal
By hatchet, axe, and saw"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20080723/778f8a39/attachment.html
More information about the Zope
mailing list