[CPS-devel] Re: Adding fields to members_CPS_fields with LDAPSetup

Olivier Grisel ogrisel at nuxeo.com
Mon Apr 24 17:46:29 CEST 2006


lopez adrian a écrit :

> So i have to add some fields to my members infos. I put a string field
> in my members_cps_field an when i want to see members info i got an
> error:
> 
> 
> Error Type:  	KeyError
> Error Value: 	
> 
> 'test'
> 
> Traceback: 	
> 
> Traceback (innermost last):
> [snip]
>     * Module Products.CPSDirectory.BaseDirectory, line 566, in
> renderEntryDetailed
>     * Module Products.CPSDirectory.BaseDirectory, line 896, in _getDataModel
>     * Module Products.CPSSchemas.DataModel, line 263, in _fetch
>     * Module Products.CPSDirectory.MetaDirectory, line 643, in getData
>     * Module Products.CPSDirectory.MetaDirectory, line 605, in
> _getEntryFromBacking
> 
> KeyError: 'test'

That is because the default entry expr that is used when the toplevel meta 
cannot find a suitable entry its members_zodb backing does not have such a key. 
You should add it in the default dict ("") in the backing settings page:

cps/portal_directories/members/members/manage_editBackings

Or directly in your XML profile, in the directories/members.xml file :

<missing-entry-expr>python:{'homeless': False, 'last_login_time': None, 'test': 
''}</missing-entry-expr>

-- 
Olivier



More information about the cps-devel mailing list
More information about CPS: CPS project - CVS - API

Hosting: Nuxeo: Zope service provider


This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.