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 |
State ⇒ Not A Bug
except maybe not enough documented list_name_field property) and helps
finishing the configuration.
Thank you.
"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."
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 ?
'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.
"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?"
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.
for the groupname? cn aka name will be using that name then.
State ⇒ Feedback
Assigned to Michael Rubinsky
now. Michael, is there a chance you could look at the composite name
part?
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).
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Queue ⇒ Turba
Summary ⇒ Problem adding contact groups when using composite fields (LDAP)
Type ⇒ Bug
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.