[Zope-CMF] Re: Bug with CMFUid content when copied indirectly and some confusion.

yuppie y.2004_ at wcm-solutions.de
Thu Aug 26 03:42:15 EDT 2004


Hi Tim!


Tim Hoffman wrote:
> As I understand it, a call to uidtool.register(object) is in main
> template. This gets called and if the object doesn't have a uid a new uid
> (UniqueIdAnnotion instance) is created and stored as an attribute 
> if the content object (currently named cmf_uid).  (UniqueIdAnnotation has
> manage_afterAdd and manage_afterClone methods etc).  So far so good.

Reading your later mails, I think this is the basic misunderstanding. 
The call to uidtool.register(object) in main_template is no general 
mechanism to assign UIDs. It's just a part of the permalinks implementation.

UIDs are not assigned by default. If your application needs UIDs for 
folders, it has to register them.


Writing that, I wonder why you have to use 'register' to make sure you 
get an UID. Wouldn't it be better if 'getUid' registers objects if 
necessary?


Cheers,
	Yuppie



More information about the Zope-CMF mailing list