[Tickets #10904] Compose window address auto-completion fails with some LDAP records

bugs at horde.org bugs at horde.org
Thu Jan 5 22:33:04 UTC 2012


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10904
------------------------------------------------------------------------------
  Ticket             | 10904
  Created By         | jmDS at hampshire.edu
  Summary            | Compose window address auto-completion fails with some
                     | LDAP records
  Queue              | Horde Base
  Version            | 4.0.13
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


jmDS at hampshire.edu (2012-01-05 22:33) wrote:

If Turba is configured to search LDAP attributes that are not a part  
of the displayed contact information, address auto-completion in the  
compose window fails.

For example, if I have Turba configured to search a 'nickname'  
attribute, but the contact string is of the form "Firstname Lastname  
<email at addess>", and I search for text that only exists in the  
nickname, auto-completion will fail. This applies to searches with  
many results, if one of them fits the above criteria. So, if I search  
for 'Bob', and that string is in someone's nickname attribute only  
(their first name is 'Robert'), no auto-completion results will be  
shown at all.

I believe this problem is in horde/js/autocomplete.js starting on line  
119. in the code that highlights the part of each auto-completion  
result that matches the text you've typed so far. If what I've typed  
does not appear in one of the elements in the array 'choices',  
n.match(re) returns nothing, and calling each() on it on line 123  
results in an error. If I change the code to use an empty array when  
n.match(re) fails, auto-completion works as I would expect:

-                n.match(re).each(function(m) {
+                var matches = n.match(re);
+
+                if (matches == null) {
+                        matches = new Array();
+                }
+
+                matches.each(function(m) {





More information about the bugs mailing list