6.0.0-beta1
9/24/25

[#6263] Problem adding contact groups when using composite fields (LDAP)
Summary Problem adding contact groups when using composite fields (LDAP)
Queue Turba
Queue Version 2.2-RC2
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester dirk (at) liji (dot) de
Created 02/14/2008 (6432 days ago)
Due
Updated 02/16/2008 (6430 days ago)
Assigned 02/15/2008 (6431 days ago)
Resolved 02/16/2008 (6430 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
02/16/2008 12:48:08 AM Chuck Hagenbuch Taken from Michael Rubinsky
State ⇒ Not A Bug
 
02/16/2008 12:47:00 AM dirk (at) liji (dot) de Comment #10 Reply to this comment
I guess this answers all questions (and confirms it to be not a bug, 
except maybe not enough documented list_name_field property) and helps 
finishing the configuration.



Thank you.


02/16/2008 12:39:25 AM Chuck Hagenbuch Comment #9 Reply to this comment
Again from Michael:



"Yes, setting the list_name_field to 'name' when *not* using a 
composite field would unset the name field prior to saving.  The 
list_name_field (as documented in the header comments of 
sources.php.dist, along with the rest of the attributes) is designed 
to specify which field of the composite name field(in turba field 
names) the contact list (group) name should be saved to...and in doing 
so, ignores the 'name' field when saving the contact list."


02/16/2008 12:03:17 AM dirk (at) liji (dot) de Comment #8 Reply to this comment
I've just seen, when i comment out the list_name_field declaration a 
newly added group gets the name mapped to 'l' according to my 
expectations.

What's the list_name_field mapping supposed to be, a horde or a native field ?
02/15/2008 11:56:16 PM dirk (at) liji (dot) de Comment #7 Reply to this comment
...

         'dn' => array('uid'),

         'objectclass' => array('locality',

                                'uidObject',

                                'turbaContact'),

     ),

     'map' => array(

         '__key' => 'dn',

         '__uid' => 'uid',



         // From horde.schema:

         '__type' => 'turbaType',

         '__members' => 'turbaMembers',



         'name' => 'l',

     ),

     'search' => array(

         'name',

     ),

     'strict' => array(

         'dn',

     ),

     'approximate' => array(

         'l',

     ),

     'export' => true,

     'browse' => true,

     'list_name_field' => 'name',

);



This is part of the test configuration, no composite field name, since 
it's locality as structural objectclass it doesn't requite any 
attribute anymore, with uidObject just a uid. The name is mapped to 
the 'l' attribute of the locality.

Now, whenever i add a group the group doesn't get a name at all, it's 
listed with an empty name.

The corresponding ldap entry is (with replaced private information)



dn: uid=20080216003157.*************@*************.de,ou=Groups,

  o=turba,dc=*****,dc=*******,dc=de

uid: 20080216003157.****************@**************.de

turbaType: Group

turbaMembers: a:1:{i:0;s:119:"lsldap:uid=20080130145215.**************@***

  ***************.de,ou=Addressbook,o=turba,dc=*****,dc=**********,dc=de";

  }

objectClass: locality

objectClass: uidObject

objectClass: turbaContact



The entry doesn't contain the 'l' attribute at all, so it doesn't 
contain the name, it is as if the name was not sent to the server.

(Ok, honestly, since the 'list_name_field' is not documented i guessed 
it's use so it's possible there's a problem in the configuration.)

I hope this example gives a better view to the problem i'm facing.



Dirk.


02/15/2008 10:49:12 PM Chuck Hagenbuch Comment #6 Reply to this comment
From Michael:



"I'm behind a rather restrictive firewall for the time being, so I 
can't update the ticket (sorry), but is the 'list_name_field' 
parameter being set in sources.php since a composite name field is 
being used?"


02/15/2008 09:34:32 PM dirk (at) liji (dot) de Comment #5 Reply to this comment
The problem is, even with very basic settings ('name' => 'cn') it 
doesn't work, it seems as if when creating (resp. saving) the group in 
ldap the name is whether not sent to the ldap server or is empty. i 
tried debugging the problem, every time i tried to create a group 
(even in a ldap address book otherwise working well with different 
contacts) it simply tries to create an entry without a cn.
02/15/2008 08:38:19 PM Jan Schneider Comment #4 Reply to this comment
Maybe I'm missing something, but why can you use the last name field 
for the groupname? cn aka name will be using that name then.
02/15/2008 06:29:19 PM Chuck Hagenbuch Comment #3
State ⇒ Feedback
Assigned to Michael Rubinsky
Reply to this comment
I didn't have trouble with LDAP groups before, but I don't use LDAP 
now. Michael, is there a chance you could look at the composite name 
part?
02/15/2008 12:58:25 AM dirk (at) liji (dot) de Comment #2 Reply to this comment
Actually, it seems quite hard, if not impossible, to add a contact 
group to an ldap directory. Whenever i try to add a group, even with 
'name' => 'cn' mapping the ldap server complains about cn being 
required (for person) and the whole thing fails. When mapping 'name' 
=> 'sn' and using checkrequired to put some string into the cn field 
on save a group will be added but without name (cn contains the string 
put in from checkrequired).
02/14/2008 10:22:47 PM dirk (at) liji (dot) de Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Queue ⇒ Turba
Summary ⇒ Problem adding contact groups when using composite fields (LDAP)
Type ⇒ Bug
Reply to this comment
When using composite fields (e.g. in LDAP) in some configurations it's 
impossible to add contact groups to the same address book.

I use a composite field similar to the example given in sources.php.

         'name' => array(

             'fields' => array('lastname', 'firstname'),

             'format' => '%s, %s',

             'attribute' => 'cn'),

Since the 'name' attribute, which will be mapped to 'cn' (cn as 
contact name occured to me to be most logic choice since sn=surname 
and givenName=first name are already ldap attributes) is a composite 
field, the name cannot be specified when creating a contact group so 
cn stays empty and the ldap server rejects the new object.



Is it possible to add something like a fallback attribute, in case the 
composite field is empty/invalid (or rejected by the backend), another 
field can be used as 'second try', so name could be the fallback field 
in my case.


Saved Queries