[turba] [imp] Autocomplete address problem.
ANANT S ATHAVALE
asa at isac.gov.in
Fri Feb 6 06:01:24 UTC 2015
----- Message from ANANT S ATHAVALE <asa at isac.gov.in> ---------
Date: Tue, 03 Feb 2015 11:54:33 +0530
From: ANANT S ATHAVALE <asa at isac.gov.in>
Subject: [imp] Autocomplete address problem.
To: imp at lists.horde.org
Cc: turba at lists.horde.org
> Dear List,
>
> I have recently installed latest stable version of HGWE.
>
> Autocomplete is not working for one of the attribute which I have
> mentioned in search under LDAP.
>
> for IMP, prefs.local.php, I have set
>
> $_prefs['search_sources']['hook'] = true;
> $_prefs['search_fields']['hook'] = true;
> $_prefs['add_source']['hook'] = true;
>
> enabled the hooks in imp/hooks.local.php
>
>
> for turba,
>
> turba/attributes.local.php (the file contains additional attribute,
> which is refered in LDAP)
>
> <?php
> $attributes['staffno'] = array(
> 'label' => _("StaffNumber"),
> 'type' => 'text',
> 'required' => false,
> 'params' => array('regex' => '', 'size' => 32, 'maxlength' => 32)
> );
>
> $attributes['postalAddress'] = array(
> 'label' => _("Postal Address"),
> 'type' => 'text',
> 'required' => false,
> );
>
> $attributes['cn'] = array(
> 'label' => _("Complete Name"),
> 'type' => 'text',
> 'required' => false,
> );
>
>
> turba/backends.local.php
>
> <?php
> $cfgSources['localsql']['title'] = 'My Address Book';
> $cfgSources['localsql']['use_shares'] = false;
> $cfgSources['localldap']['disabled'] = false;
> $cfgSources['localldap']['title'] = 'LDAP Directory';
> $cfgSources['localldap']['params']['server'] = 'xxx.xx.x.xx';
> $cfgSources['localldap']['params']['root'] = 'dc=xxxx,dc=xxx';
> $cfgSources['localldap']['params']['bind_dn'] = 'cn=Manager,dc=xxx';
> $cfgSources['localldap']['params']['bind_password'] = 'xxxxxxxxxx';
> $cfgSources['localldap']['params']['limit'] = 20;
> $cfgSources['localldap']['params']['scope'] = 'sub';
> $cfgSources['localldap']['map'] = array(
> '__key' => 'dn',
> '__uid' => 'mailacceptinggeneralid',
> 'staffno' => 'staffnumber',
> 'postalAddress' => 'postalAddress',
> 'cn' => 'cn',
> 'name' => array('fields' => array('cn', 'postalAddress'),
> 'format' => '%s %s',
> 'parse' => array(
> array('fields' => array('cn'),
> 'format' => '%s' ),
> array('fields' => array('cn', 'postalAddress'),
> 'format' => '%s', '%s' ))),
> 'email' => 'mail',
> 'freebusyUrl' => 'uid'
> );
> $cfgSources['localldap']['search'] = array('staffno','name','email');
> $cfgSources['localldap']['export'] = false;
> $cfgSources['localldap']['browse'] = false;
>
> turba/prefs.local.php
>
> <?php
> $prefGroups['addressbooks']['suppress'] = true;
> $prefGroups['sync']['suppress'] = true;
> $prefGroups['columns']['suppress'] = true;
> $_prefs['default_dir']['locked'] = true;
> $_prefs['default_dir']['value'] = 'localsql';
> $_prefs['columns']['locked'] = true;
> $_prefs['columns']['value']=
> "localsql\temail\nlocalldap\temail\tstaffno\nfavourites\temail";
>
>
> With these settings, if I try to autocomplete on staff number, it
> does not work. While on name and email it works. How to debug?
>
>
>
> --
> सादर धन्यवाद/ Thanks & Regards
> अनंत / Anant
> ------------------------------------------------------------------------------
> Confidentiality Notice: This e-mail message, including any
> attachments, is for
> the sole use of the intended recipient(s) and may contain confidential and
> privileged information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> contact the sender by reply e-mail and destroy all copies of the original
> message.
> ------------------------------------------------------------------------------
>
> --
> imp mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
----- End message from ANANT S ATHAVALE <asa at isac.gov.in> -----
I did add the following lines in ContactAutoCompleter.php
54,57c54
<
< Horde::debug($ob->fields, "/logs/horde-debug.log");
< Horde::debug($ob->sources, "/logs/horde-debug.log");
<
and please find attached horde-debug.log file. I am also seeing in
LDAP log that, it is being searched for the parameter.
Feb 6 11:35:49 servername slapd[1267]: conn=128477575 op=1 SRCH
base="dc=xxxx,dc=xxx" scope=2 deref=0
filter="(|(staffnumber=*xx0xxxx*)(|(|(cn=*xx0xxxx*)(postalAddress=*xx0xxxx*)))(mail=*xx0xxxx*))
Please suggest, what I should look at to resolve the issue.
--
सादर धन्यवाद/ Thanks & Regards
अनंत / Anant
------------------------------------------------------------------------------
Confidentiality Notice: This e-mail message, including any attachments, is for
the sole use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.
------------------------------------------------------------------------------
-------------- next part --------------
2015-02-06T11:15:48+05:30 DEBUG: Variable information:
array(3) {
["localsql"]=>
array(2) {
[0]=>
string(4) "name"
[1]=>
string(5) "email"
}
["localldap"]=>
array(3) {
[0]=>
string(7) "staffno"
[1]=>
string(4) "name"
[2]=>
string(5) "email"
}
["favourites"]=>
array(1) {
[0]=>
string(5) "email"
}
}
Backtrace:
1. Horde_Core_Ajax_Application->doAction() /var/www/horde/services/ajax.php:61
2. call_user_func() /usr/share/pear/Horde/Core/Ajax/Application.php:175
3. Horde_Core_Ajax_Application_Handler_Imple->imple()
4. Horde_Core_Ajax_Imple->handle() /usr/share/pear/Horde/Core/Ajax/Application/Handler/Imple.php:31
5. Horde_Core_Ajax_Imple_AutoCompleter->_handle() /usr/share/pear/Horde/Core/Ajax/Imple.php:120
6. Horde_Core_Ajax_Imple_ContactAutoCompleter->_handleAutoCompleter() /usr/share/pear/Horde/Core/Ajax/Imple/AutoCompleter.php:56
7. Horde_Core_Ajax_Imple_ContactAutoCompleter->getAddressList() /usr/share/pear/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:46
8. IMP_Ajax_Imple_ContactAutoCompleter->_getAddressbookSearchParams() /usr/share/pear/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:62
9. Horde::debug() /var/www/horde/imp/lib/Ajax/Imple/ContactAutoCompleter.php:55
2015-02-06T11:15:48+05:30 DEBUG: Variable information:
array(3) {
[0]=>
string(8) "localsql"
[1]=>
string(9) "localldap"
[2]=>
string(10) "favourites"
}
Backtrace:
1. Horde_Core_Ajax_Application->doAction() /var/www/horde/services/ajax.php:61
2. call_user_func() /usr/share/pear/Horde/Core/Ajax/Application.php:175
3. Horde_Core_Ajax_Application_Handler_Imple->imple()
4. Horde_Core_Ajax_Imple->handle() /usr/share/pear/Horde/Core/Ajax/Application/Handler/Imple.php:31
5. Horde_Core_Ajax_Imple_AutoCompleter->_handle() /usr/share/pear/Horde/Core/Ajax/Imple.php:120
6. Horde_Core_Ajax_Imple_ContactAutoCompleter->_handleAutoCompleter() /usr/share/pear/Horde/Core/Ajax/Imple/AutoCompleter.php:56
7. Horde_Core_Ajax_Imple_ContactAutoCompleter->getAddressList() /usr/share/pear/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:46
8. IMP_Ajax_Imple_ContactAutoCompleter->_getAddressbookSearchParams() /usr/share/pear/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:62
9. Horde::debug() /var/www/horde/imp/lib/Ajax/Imple/ContactAutoCompleter.php:56
2015-02-06T11:15:49+05:30 DEBUG: Variable information:
array(3) {
["localsql"]=>
array(2) {
[0]=>
string(4) "name"
[1]=>
string(5) "email"
}
["localldap"]=>
array(3) {
[0]=>
string(7) "staffno"
[1]=>
string(4) "name"
[2]=>
string(5) "email"
}
["favourites"]=>
array(1) {
[0]=>
string(5) "email"
}
}
Backtrace:
1. Horde_Core_Ajax_Application->doAction() /var/www/horde/services/ajax.php:61
2. call_user_func() /usr/share/pear/Horde/Core/Ajax/Application.php:175
3. Horde_Core_Ajax_Application_Handler_Imple->imple()
4. Horde_Core_Ajax_Imple->handle() /usr/share/pear/Horde/Core/Ajax/Application/Handler/Imple.php:31
5. Horde_Core_Ajax_Imple_AutoCompleter->_handle() /usr/share/pear/Horde/Core/Ajax/Imple.php:120
6. Horde_Core_Ajax_Imple_ContactAutoCompleter->_handleAutoCompleter() /usr/share/pear/Horde/Core/Ajax/Imple/AutoCompleter.php:56
7. Horde_Core_Ajax_Imple_ContactAutoCompleter->getAddressList() /usr/share/pear/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:46
8. IMP_Ajax_Imple_ContactAutoCompleter->_getAddressbookSearchParams() /usr/share/pear/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:62
9. Horde::debug() /var/www/horde/imp/lib/Ajax/Imple/ContactAutoCompleter.php:55
2015-02-06T11:15:49+05:30 DEBUG: Variable information:
array(3) {
[0]=>
string(8) "localsql"
[1]=>
string(9) "localldap"
[2]=>
string(10) "favourites"
}
Backtrace:
1. Horde_Core_Ajax_Application->doAction() /var/www/horde/services/ajax.php:61
2. call_user_func() /usr/share/pear/Horde/Core/Ajax/Application.php:175
3. Horde_Core_Ajax_Application_Handler_Imple->imple()
4. Horde_Core_Ajax_Imple->handle() /usr/share/pear/Horde/Core/Ajax/Application/Handler/Imple.php:31
5. Horde_Core_Ajax_Imple_AutoCompleter->_handle() /usr/share/pear/Horde/Core/Ajax/Imple.php:120
6. Horde_Core_Ajax_Imple_ContactAutoCompleter->_handleAutoCompleter() /usr/share/pear/Horde/Core/Ajax/Imple/AutoCompleter.php:56
7. Horde_Core_Ajax_Imple_ContactAutoCompleter->getAddressList() /usr/share/pear/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:46
8. IMP_Ajax_Imple_ContactAutoCompleter->_getAddressbookSearchParams() /usr/share/pear/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:62
9. Horde::debug() /var/www/horde/imp/lib/Ajax/Imple/ContactAutoCompleter.php:56
More information about the turba
mailing list