[Zope-CMF] error on renaming a custom content type
Aaron Payne
aaron@aaronpayne.com
Sat, 3 Aug 2002 09:25:55 -0500
Hi Florent,
On Friday, August 2, 2002, at 10:25 PM, Florent Guillaume wrote:
> Aaron Payne <aaron@aaronpayne.com> wrote:
>> I've written a custom content type Biography for my cmf site based on
>> the event type in CMFCalendar. The new type is subclassed
>> OFS.Image.Image, PortalContent, DefaultDublinCoreImpl (in that order.)
>>
>> I can add, edit, delete or view an instance of the custom type with no
>> problem.
>> Once I rename the instance, I lose the ability to perform any of these
>> actions.
> Hmm, yes, Image is actually deriving from Item_w__name__. The problem is
> that Item_w__name__ has:
>
> def _setId(self, id):
> self.__name__=id
>
> One way to fix your problem would be to subclass, in that order, from:
> OFS.CopySupport.CopySource
> OFS.Image.Image
> PortalContent
> DefaultDublinCoreImpl
> because CopySource will expose the correct _setId.
>
>
This helped a bit. I can now rename the objects but there is still a
problem. When iterating through the object actions for this content
type, the old id is still used in creating the link to the action
form. I am using a plain cmf site for these tests.
thanks,
Aaron
> BTW can someone enlighten us on the purpose of Item_w__name__ wrt Item?
>
> Florent
> --
> Florent Guillaume, Nuxeo (Paris, France)
> +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com
>
____________________________________
Aaron Payne
Silicon Prairie Ventures, Inc.
web: http://www.spvi.com
email: aaron@spvi.com
phone: 317.319.6108
fax: 317.351.1170