[Zope] cut and paste or an object

Andy McKay AndyM@ActiveState.com
Tue, 11 Jul 2000 09:40:54 -0700


Sorry, I cant shed any light but I still have the exact same problem. More
bizarrely I could copy then delete then paste and that worked fine.


----- Original Message -----
From: "Terry Kerr" <terry@adroit.net>
To: <zope@zope.org>
Sent: Tuesday, July 11, 2000 2:10 AM
Subject: [Zope] cut and paste or an object


> Hi,
>
> I have written a product in python which has two classes.  One is a
> contrainer class, and the other as an item.  Both classes are
> catalogAware.  Both have management interfaces which allow
> cut/copy/paste.  Copy and paste works fine.  But if I paste an object
> that has been cut, i get the error:
>
> Traceback (innermost last):
>     File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py,
> line 214, in publish_module
>     File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py,
> line 179, in publish
>     File /home/tejay/Zope-2.1.6-src/lib/python/Zope/__init__.py, line
> 202, in zpublisher_exception_hook
>       (Object: RoleManager)
>     File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py,
> line 165, in publish
>     File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/mapply.py,
> line 160, in mapply
>       (Object: manage_pasteObjects)
>     File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py,
> line 102, in call_object
>       (Object: manage_pasteObjects)
>     File /home/tejay/Zope/lib/python/OFS/CopySupport.py, line 225, in
> manage_pasteObjects
>       (Object: RoleManager)
>     File /home/tejay/Zope-2.1.6-src/lib/python/OFS/ObjectManager.py,
> line 273, in _delObject
>       (Object: RoleManager)
>     File
>
/home/tejay/Zope-2.1.6-src/lib/python/Products/ZCatalog/CatalogAwareness.py,
> line 129, in manage_beforeDelete
>       (Object: CatalogAware)
>     File
>
/home/tejay/Zope-2.1.6-src/lib/python/Products/ZCatalog/CatalogAwareness.py,
> line 186, in unindex_object
>       (Object: CatalogAware)
>     File
>
/home/tejay/Zope-2.1.6-src/lib/python/Products/ZCatalog/CatalogAwareness.py,
> line 156, in url
>       (Object: CatalogAware)
>     File /home/tejay/Zope-2.1.6-src/lib/python/OFS/SimpleItem.py, line
> 319, in absolute_url
>       (Object: CatalogAware)
>     File /home/tejay/Zope-2.1.6-src/lib/python/OFS/SimpleItem.py, line
> 319, in absolute_url
>       (Object: RoleManager)
>     File /home/tejay/Zope-2.1.6-src/lib/python/OFS/SimpleItem.py, line
> 319, in absolute_url
>       (Object: ElementWithAttributes)
>     File /home/tejay/Zope/lib/python/OFS/Application.py, line 282, in
> absolute_url
>       (Object: ApplicationDefaultPermissions)
>   AttributeError: aq_acquire
>
> The only difference between cutnpast and copynpaste is that cutnpaste
> will remove the object before setting the new object.  The problem seems
> to lie in obtaining the absolute_url of the object to be removed which
> is need by CatalogAware to unindex the object.  I dont understand this,
> as a direct call to _delObject() from the contrainer class works fine,
> so I don't understand why a call to _delObject from within the
> manage_pastObjects method results in the above error.
>
> I have been trying to figure this out for days.  Can anyone shead any
> light on the subject?
>
> terry
>
>
>
> --
> Terry Kerr (terry@adroit.net)
> Adroit Internet Solutions Pty Ltd (www.adroit.net)
> Phone:   +613 9563 4461
> Fax:     +613 9563 3856
> Mobile:  +61 414 938 124
> ICQ:     79303381
>
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>