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>; Brian Lloyd <Brian@digicool.com>; zope-dev@zope.org <zope-dev@zope.org> Date: Wednesday, August 18, 1999 10:40 AM Subject: RE: [Zope-dev] Something doesn't seem quite right with CopySupport.py/Moniker.py
Files\Byproducts\lib\python\OFS\CopySupport.py, line 198, in manage_pasteObjects (Object: CatalogAware) Copy Error: (see above)
hmmm - CatalogAware? That looks strange indeed. To take a guess, it looks like the paste is failing on a ZClass instance. A way to test this would be to try your copying external method on two plain folders that contain only "builtin" objects like files or images. If the method works in that case, then I suspect something funny about one of your ZClasses. In particular, make sure that all of them list either ZObject or ZObjectManager in their list of base classes. Also, did any of the ZClasses you are copying get imported into your site from an earlier Zope version?
Thanks for the hints... Keep in mind that I have been able to copy and paste to this ZClass through the management interface... I just performed four tests... 1) Run the candp method with the destination being a normal Folder. This worked. 2) Run the candp method with the destination being a new ZClass with base classes of CatalogAware and Object Manager. This worked also. 3) Try to copy the image into a ZClass that exists above the real target ZClass in the hierarchy (I have ZClasses nested a few levels deep). This worked... 4) Create a ZClass contained within the ZClass from test 2 (also with bases of CatalogAware and ObjectManager). When I try to create an instance of this class, I get (right after clicking the Add button): Sorry, the requested Zope resource does not exist.<p>Check the URL and try again.<p> <!-- who knows! --> Traceback (innermost last): File C:\Program Files\Byproducts\lib\python\ZPublisher\Publish.py, line 209, in publish_module File C:\Program Files\Byproducts\lib\python\ZPublisher\Publish.py, line 179, in publish File C:\Program Files\Byproducts\lib\python\Zope\__init__.py, line 199, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File C:\Program Files\Byproducts\lib\python\ZPublisher\Publish.py, line 151, in publish File C:\Program Files\Byproducts\lib\python\ZPublisher\BaseRequest.py, line 422, in traverse File C:\Program Files\Byproducts\lib\python\AccessControl\User.py, line 373, in validate (Object: RoleManager) File C:\Program Files\Byproducts\lib\python\ZPublisher\HTTPResponse.py, line 510, in notFoundError NotFound: (see above) The permissions seem to be fine... (there is an Add Foo2s permission, the factory has that permission selected... I've selected the Add Foo1s and Add Foo2s permissions for each of the permissions in the Define Permissions tab of both ZClasses and I've tried this as both a Manager and the superuser). I could swear I was able to do this in the last beta... I will say this: the ZClass that I am trying to copy an image into is KMArticle from KM|Net News. I *think* this class did originate in the last beta. That was why I wanted to try a fresh class, and ran into the problem above. Here is the original DTML method that I'm getting the error in: <!--#var standard_html_header--> <dtml-with oldart> <dtml-with 1999> <dtml-in "objectIds(['Folder'])"> <dtml-call "REQUEST.set('month', _['sequence-item'])"> <dtml-with "_[_['sequence-item']]"> <dtml-in "objectIds(['Folder'])"> <dtml-with "_[_['sequence-item']]"> <p> <dtml-var title> <dtml-call "REQUEST.set('id', id)"> <dtml-call "REQUEST.set('title', title)"> <dtml-call "REQUEST.set('email', email)"> <dtml-call "REQUEST.set('author', author)"> <dtml-call "REQUEST.set('teaser', summary)"> <dtml-call "REQUEST.set('text_content', text)"> <dtml-call "REQUEST.set('createtime', createtime)"> <dtml-call "REQUEST.set('release', release)"> <dtml-call "REQUEST.set('current', 'on')"> <dtml-call "REQUEST.set('top', 'off')"> <dtml-call "REQUEST.set('category', category)"> <dtml-call "REQUEST.set('importance', importance)"> <dtml-call "REQUEST.set('score', 2000000000-score)"> <dtml-call "REQUEST.set('points', points)"> <dtml-call "REQUEST.set('votes', votes)"> <dtml-call "REQUEST.set('topimg', topimg)"> <dtml-call "REQUEST.set('fobj', this())"> <dtml-with art> <dtml-with 1999> <dtml-with "_[month]"> <dtml-call "KMArticle_add(_.None, _, NoRedir=1)"> <dtml-with "_[REQUEST['id']]"> <dtml-call "candp(fobj, this(), REQUEST)"> </dtml-with> </dtml-with> </dtml-with> </dtml-with> </p> </dtml-with> </dtml-in> </dtml-with> </dtml-in> </dtml-with> </dtml-with> <!--#var standard_html_footer--> There are two things that I'm wondering about: 1) I'm getting to the "art" ZClass through acquisition from several levels deep. Could this cause a problem? 2) Would there be any problem pasting to an object that is created during the same transaction? Sorry for the deluge of info, but I thought I might be able to save you from having to ask for each additional step... Let me know if there is more than I can do to test and clarify. Thanks! Kevin
participants (1)
-
Kevin Dangoor