[Zope] LDAP variable problem

zope zope@isp.lu
Mon, 13 Nov 2000 09:32:42 +0100


Hi.

I was inserting the "missing=&nbsp;" statement into the <dtml-var sn> key.
In fact, I don't get the key error anymore. But unfortunately, I don't get 
the values of the sn attribute either.
The method just returns me an empty line for every LDAP entry.
How can I access the LDAP attributes?

any ideas?

Thanks a lot.

Marc Ludwig
Luxembourg


At 14:29 12.11.2000 +1100, you wrote:
>Hi Zopistas,
>
>Firstly, a big thank you to all thos epeople who helped me with KeyError 
>problem when accessing LDAP entries.
>Just so the solution makes it onto the mailing list archive (for the next 
>bunny who has the same problem) the solution was to add the following to 
>each of your variables
>
>missing=&nbsp;
>
>...so that when Zope came across entries without that attribute it didn't 
>barf.
>
>I now have one last problem. I can now access all entries from the LDAP 
>directory using the notation <dtml-var sn missing = &nbsp;>- all except 
>one - the "title" attibute .
>
>I am guessing that it is because Zope uses "title" to reference the title 
>of the object in the zope database, and therefore won't let you get at the 
>ldap variable using the normal:
><dtml-var title> notation.
>
>Is there any way I can pinpoint the LDAP variable instead of the object 
>title in zope? I have no control over the ldap server and attributes name, 
>so I can't change it at that end.
>
>When I test the LDAP filter method I can see the variable (it lists all of 
>the attributes of the LDAP record), but I can't reference it in DTML.
>My filter method is called 'Academics' and just extracts a list of 
>academics in the biology department here at Monash University. I'm sure 
>there must be a way using python notation, but not being a python expert 
>(yet!), I could do with a few clues...
>
>
>Any ideas?
>
>Thanks again...
>
>  - Michael
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Michael Blewett
>Computer Support Mgr - Biological Sciences
>Monash University (Clayton Campus)
>Victoria Australia 3168
>
>"I'm out of my mind at the moment, but feel free to leave a message..."
>
>
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
>http://lists.zope.org/mailman/listinfo/zope-dev )