[Zope] The id "s5/begin" contains characters illegal in URLs

Sinang, Danny D.Sinang at spi-bpo.com
Thu Aug 10 03:01:52 EDT 2006


> You must call manage_renameObject on the object *container*, passing
the old name and the new name. Something like this:

>   object = result[1]
>   container = object.aq_parent
>   container.manage_renameObject(object.id, object.id.lower())

Thanks Gabriel.

I did exactly as you suggested, but ran into this error :

/////////////////////////////////////////////////
The id "begin" is invalid - it is already in use.
/////////////////////////////////////////////////

"Begin" is the first activity. It could be some reserved word within
OpenFlow or Zope - not really sure. 

In any case, I tried skipping it, but ran into another error message
saying :

///////////////////////////////////////////////////////////////////////
The object RECEIPT_OF_SOURCE_DOCUMENTS does not support this operation.
///////////////////////////////////////////////////////////////////////

My code looks like this :

////////////////////////////////////////////////////////////////////////
/

wf = container.GeneralWorkflow
catalog = wf.Catalog

results = catalog.ZopeFind(wf, obj_metatypes=['Activity'], search_sub=1)


for result in results:
    print result[1].id
    if result[1].id <> 'Begin':
       object = result[1]
       container = object.aq_parent
       container.manage_renameObject(object.id, object.id.lower())

return printed 

////////////////////////////////////////////////////////////////////////
/


Regards,
Danny



More information about the Zope mailing list