[Zope-CMF] Python: trying to copy files

Ryan P. de Vega rpd4972@hbu.edu
Mon, 29 Jul 2002 09:17:50 -0500


I tried this problem on another PC with pretty much the same setup.  I
still was unsuccessful.  What I am wondering is what version of CMF you
are currently using.  I think that this might be why mine isn't working
right - I'm using 1.2.  Please let me know.  Thanks again!

Ryan
rdevega@hbu.edu


schubbe@web.de writes:
>Ryan P. de Vega wrote:
>> schubbe@web.de writes:
>> 
>>>This seems to be a permission problem. Is that user able to paste the 
>>>object into 'Test' by hand?
>> 
>> <-- Answer: Yes
>> 
>> I thought that you might be on to something ... so I gave that user full
>> permission temporarily.  Still a no go.  :( 
>> 
>> REQUEST=context.REQUEST
>> if REQUEST.has_key('ids'):
>>   tmpObj = context.manage_copyObjects(REQUEST['ids'])
>>   context.portal_url.getPortalObject().TEST.manage_pasteObjects(tmpObj)
>>   return REQUEST.RESPONSE.redirect(context.absolute_url() +
>> '/folder_contents?portal_status_message=Item(s)+Published.')
>> 
>> 
>> Like this????  All I have to put is TEST (the name of my folder).  I
>don't
>> have to define TEST or do any other fancy stuff? - By the way I tried
>that
>> stuff too.
>
>Nothing. If you want you can use this instead:
>context.portal_url.getPortalObject()['TEST'].manage_pasteObjects(tmpObj)
>
>But that can't be the problem. I did copy your code in my site - it 
>works for me!
>
>I surrender. Have a look at CopySupport.py and the lines that raise your 
>error. Anybody else has idea?
>
>Yuppie