Re: inserting ZMSLinkElement via manage_addZMSObject

Rainer Feigl <[email protected]>
Newsgroups gmane.comp.cms.zms.devel
Message-ID <[email protected]>
forgot to mention my installed zms-version.
here it is: 2.11.1-49

On Monday 20 April 2009 11:04:34 Rainer Feigl wrote:
> hi folks,
> 
> i try to insert ZMSLinkElements via manage_addZMSObject
> 
> my code:
> <dtml-call "manage_addZMSObject('ZMSCustom', values={'meta_id': 'ZMSLinkElement', 'attr_ref': 'http://www.someurl.com'}, REQUEST={'lang': lang})">
> 
> doing this i get the following error:
> -----------------------------------------------
>     *  Module DocumentTemplate.DT_String, line 476, in __call__
>     * Module DocumentTemplate.DT_In, line 703, in renderwob
>     * Module DocumentTemplate.DT_Util, line 196, in eval
>       __traceback_info__: manage_addZMSObject
>     * Module <string>, line 1, in <expression>
>     * Module Products.zms.zmscontainerobject, line 216, in manage_addZMSObject
>     * Module Products.zms._versionmanager, line 530, in onChangeObj
>     * Module Products.zms._versionmanager, line 1365, in commitObj
>     * Module Products.zms._versionmanager, line 669, in commitObjChanges
>     * Module Products.zms._versionmanager, line 660, in _commitObjChanges
>     * Module Products.zms._versionmanager, line 552, in onSynchronizeObj
>     * Module Products.zms._accessmanager, line 295, in synchronizePublicAccess
> 
> AttributeError: isEmbedded
> -----------------------------------------------
> 
> in line _accessmanager on line 295 there is:
> if self.meta_id == 'ZMSLinkElement' and self.isEmbedded( self.REQUEST):
> 
> i have no clue why isEmbedded doesnt work here.
> 
> i tried to figure out what zms does itself when i manually insert a new link elemenet, but manage_addZMSLinkElement in zmslinkelement.py is using its own code with a redirect at the end. so i cant use this really in my case.
> 
> my understanding of the new object model is to use manage_ZMSCustom/Object for inserting new stuff.
> why does the manage_addZMSLinkElement in zmslinkelement.py doing its own stuff, instead of using those functions? i guess thats the case with other objects too.
> 
> best regards
> 
> rainer feigl
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.