5.3.0-git
2014-10-26

[#10843] Autocomplete address does not work for additional fields of LDAP
Summary Autocomplete address does not work for additional fields of LDAP
Queue Horde Groupware Webmail Edition
Queue Version 4.0.4
Type Bug
State No Feedback
Priority 2. Medium
Owners
Requester asa (at) isac (dot) gov (dot) in
Created 2011-12-08 (1053 days ago)
Due
Updated 2013-08-27 (425 days ago)
Assigned 2011-12-09 (1052 days ago)
Resolved 2013-08-27 (425 days ago)
Milestone
Patch No

History
2013-08-27 11:04:59 Jan Schneider State ⇒ No Feedback
 
2012-03-09 20:17:58 mehmet (at) giritli (dot) eu Comment #11 Reply to this comment
I am having autocomplete problems as well but in my case, autocomplete 
does not work at all. It only works for local sql backend but nothing 
seems to work for ldap. When the recepient addres is typed in, I can 
see that turba queries ldap server and results are returned from the 
ldap server log but no autocomplete suggestions are shown..

Everything works in Turba with my ldap addressbooks. There are 
absolutely no problems with it. My only problem is autocomplete.

I checked debug logs and there are absolutely nothing interesting 
except that a request is made to the ldap server. But if needed I can 
provide debug logs as well.

Is there any other setting besides 'Prefs-> Mail-> Addressbooks' that 
relates to autocomplete and I am missing? I didn't have any problems 
with H3 before.
2012-02-21 06:59:26 asa (at) isac (dot) gov (dot) in Comment #10 Reply to this comment
Whether  the solved bug #10961 and this one (#10843) related?

-ANANT

[Show Quoted Text - 15 lines]
2011-12-29 11:27:28 asa (at) isac (dot) gov (dot) in Comment #9 Reply to this comment
I tried setting search_sources and search_fields hard coded.  Still, 
it does not work for the additional LDAP attribute (staffno).   
According to my knowledge, hook is giving correct output, but the 
functionality is not working.

So, Neither hook works nor hard coding.

-ANANT.
Yes. Hooks work everywhere else.  Even in IMP except that it does not
do search based on the new attribute.  Please see this thread.
So what now? Does it work or not? I'm talking about this single hook.
2011-12-29 09:14:09 Jan Schneider Comment #8 Reply to this comment
Yes. Hooks work everywhere else.  Even in IMP except that it does 
not do search based on the new attribute.  Please see this thread.
So what now? Does it work or not? I'm talking about this single hook.
2011-12-29 08:47:42 asa (at) isac (dot) gov (dot) in Comment #7 Reply to this comment
Why don't you hardcode the return value of the 
search_sources/search_fields hook?
I can do that.  But, using hook makes it easy.
And does the hook actually work at all? If you go to the 
preferences, are the correct fields enabled?
Yes. Hooks work everywhere else.  Even in IMP except that it does not 
do search based on the new attribute.  Please see this thread.

http://lists.horde.org/archives/imp/Week-of-Mon-20111031/052825.html

-Anant

2011-12-28 16:52:36 Jan Schneider Comment #6 Reply to this comment
Why don't you hardcode the return value of the 
search_sources/search_fields hook?
And does the hook actually work at all? If you go to the preferences, 
are the correct fields enabled?
2011-12-09 13:29:43 asa (at) isac (dot) gov (dot) in Comment #5
New Attachment: hooks.local.php Download
Reply to this comment
Which hook? Post your hook code.
I am attaching only relevant hook code.
2011-12-09 13:22:11 Jan Schneider Comment #4 Reply to this comment
Which hook? Post your hook code.
2011-12-09 13:17:52 asa (at) isac (dot) gov (dot) in Comment #3 Reply to this comment
imp/hooks.local.php

enabled all cases of functions under

   public function prefs_init($pref, $value, $username, $scope_ob)
What do you mean?
I have locked the pref and enabled the respective hook functions.



2011-12-09 12:23:17 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
imp/hooks.local.php

enabled all cases of functions under

   public function prefs_init($pref, $value, $username, $scope_ob)
What do you mean?
2011-12-08 12:12:23 asa (at) isac (dot) gov (dot) in Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Groupware Webmail Edition
Summary ⇒ Autocomplete address does not work for additional fields of LDAP
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
My turba/backends.local.php has LDAP configuration as below.

$cfgSources['localldap'] = array(
// Disabled by default
'disabled' => false,
'title' => _("LDAP Directory"),
'type' => 'ldap',
'params' => array(
     'server' => 'localhost',
     'port' => 389,
     'tls' => false,
     'root' => 'dc=xxx,dc=xxxx',
     'bind_dn' => 'cn=Manager,dc=xxx',
     'bind_password' => 'xxxxx',
     'sizelimit' => 10,
     'dn' => array('cn'),
     'objectclass' => array('employee'),
     'scope' => 'sub',
     'charset' => 'utf-8',
     'checkrequired' => false,
     'checkrequired_string' => ' ',
     'checksyntax' => false,
     'version' => 3,
),
'map' => array(
     '__key' => 'dn',
     '__uid' => 'uid',
     'name' => 'cn',
     'email' => 'mail',
     'nickname' => 'staffnumber',
),
'search' => array(
     'name',
     'email',
     'nickname',
),
'strict' => array(
     'dn',
),
'approximate' => array(
     'cn',
),
'export' => false,
'browse' => false,
);

My IMP preferences are: imp/prefs.local.php

$_prefs['search_sources']['locked'] = true;
$_prefs['search_sources']['hook'] = true;
$_prefs['search_fields']['locked'] = true;
$_prefs['search_fields']['hook'] = true;
$_prefs['add_source']['locked'] = true;
$_prefs['add_source']['hook'] = true;


imp/hooks.local.php

enabled all cases of functions under

   public function prefs_init($pref, $value, $username, $scope_ob)

But, even after this, I am unable to auto complete address based on 
nickname/staffnumber.  This was working in H3.