6.0.0-alpha12
6/12/25

[#13941] LDAP List of Contacts fails with missing contact
Summary LDAP List of Contacts fails with missing contact
Queue Turba
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester heinz (at) htl-steyr (dot) ac (dot) at
Created 04/07/2015 (3719 days ago)
Due
Updated 04/15/2015 (3711 days ago)
Assigned 04/09/2015 (3717 days ago)
Resolved 04/15/2015 (3711 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/15/2015 03:26:36 PM Michael Rubinsky Comment #6
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
This should already be fixed in Git since Turba_Driver_Ldap::_read() 
now correctly throws Horde_Exception_NotFound.
04/13/2015 12:10:45 PM asa (at) isac (dot) gov (dot) in Comment #5 Reply to this comment
Maybe ticket #13197 is related
I agree that it is related to the bug mentioned above.
04/09/2015 06:31:55 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #4 Reply to this comment
Maybe ticket #13197 is related
04/09/2015 06:27:00 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #3 Reply to this comment
The actual bug is that there shouldn't be an exception leading to a 
fatal error. Can you please provide the full error message and 
backtrace?
In Turba_Driver_Ldap function _read() is called with an none existing dn.
@ldap_read returns no (false) result and ldap_error is "No such object"
  -> throw new Turba_Exception(sprintf(_("Read failed: (%s) %s"), 
ldap_errno($this->_ds), ldap_error($this->_ds)))


Turba_Driver's getObjects() has no exception handling and
Turba_Object_Group's listMembers() catches only Horde_Exception_NotFound


This results in a red notification box: "Failed to browse list" and no 
existing list members are displayed

quick fix:
catching a Turba_Exception also (in listMembers) leads in a
"There is 1 contact in this list that is not viewable to you"
witch would be correct

But: Maybe the Turba_Driver_Ldap should throw a 
Horde_Exception_NotFound in case of "No such object" error
But to answer your original question: it's sufficient to copy the 
$_objectOptions setting from the Kolab driver to the LDAP driver.
This would be nice to have in one of the next turba releases
04/09/2015 03:06:22 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
The actual bug is that there shouldn't be an exception leading to a 
fatal error. Can you please provide the full error message and 
backtrace?
But to answer your original question: it's sufficient to copy the 
$_objectOptions setting from the Kolab driver to the LDAP driver.
04/07/2015 07:56:34 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ LDAP List of Contacts fails with missing contact
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I'm using LDAP as backend for turba
Creating a list of contacts leads in a link of  contact-dns in the 
contact list object.

If the origin contact is deleted, the dn in the contact list is missing.
Browsing the list leads in an exception. The whole list is not useable

I discovered that the Kolab driver makes use of the driver option 
"removeMissing"
In my case, i think a similar procedure would fix the problem.

But where should this option be set?
Should I implement an objectOptions field in config/backends.php to 
remove missing listmembers?

Should this option be a bool value?
listMembers function of Turba_Object_Group checks only 
!empty($this->_options['removeMissing']) an not set to true


bug priority: very low
but: If the further proceeding is clear, I would create a patch to fix

Saved Queries