Opened 4 years ago

Closed 3 years ago

#1486258 closed Bugs (fixed)

Addressbook completion shows regexp pattern

Reported by: duelli Owned by:
Priority: 5 Milestone: 0.4-beta
Component: User Interface Version: 0.3-stable
Severity: minor Keywords:
Cc:

Description

I have to LDAP address books configured which work fine.

Just found that with current trunk when I type a string, e.g. "abc" in the address bar and wait until the "Search..." status message popups up and delete it again.

A selection of regexp pattern pops up as shown in the attached screenshot.

Attachments (3)

screenshot.png (58.3 KB) - added by duelli 4 years ago.
screenshot-reproducible.png (11.2 KB) - added by duelli 3 years ago.
debug.png (18.7 KB) - added by duelli 3 years ago.
expected output for search string "12"

Download all attachments as: .zip

Change History (17)

Changed 4 years ago by duelli

comment:1 Changed 4 years ago by alec

I'm unable to reproduce. We need more info.

comment:2 Changed 3 years ago by duelli

I am sorry. I cannot reproduce it on my other machine.

Please close this bug as invalid, I will reopen it if I find a way to reproduce this issue.

comment:3 Changed 3 years ago by alec

  • Resolution set to invalid
  • Status changed from new to closed

Changed 3 years ago by duelli

comment:4 Changed 3 years ago by duelli

  • Resolution invalid deleted
  • Severity changed from normal to minor
  • Status changed from closed to reopened

I found a pattern to reproduce it, have a look at the screenshot

comment:5 Changed 3 years ago by alec

I'm still unable to reproduce. Maybe it relies on data in addressbook.

comment:6 Changed 3 years ago by alec

Please, try with svn-trunk version.

comment:7 Changed 3 years ago by duelli

Tried with latest revision. The problem is still reproducible for me with pattern

123,

I tried to dig a bit into this problem. Therefore, I checked ldap output of the autocomplete:

[11-Feb-2010 19:20:06 +0100]: C: Connect [my.ldap.de:389]
[11-Feb-2010 19:20:06 +0100]: S: OK
[11-Feb-2010 19:20:06 +0100]: C: Search [(&(objectClass=inetOrgPerson)(|(mail=*123*)(cn=*123*)))]
[11-Feb-2010 19:20:06 +0100]: S: 0 record(s)
[11-Feb-2010 19:20:06 +0100]: C: Connect [my.ldap2.de:389]
[11-Feb-2010 19:20:06 +0100]: S: OK
[11-Feb-2010 19:20:06 +0100]: C: Search [(&(objectClass=inetOrgPerson)(|(mail=*123*)(cn=*123*)))]
[11-Feb-2010 19:20:06 +0100]: S: 4 record(s)

which looks good.

I guess that the autocomplete splits the 123, string by the comma, doesn't it?!

I also found that the matching ldap entries do not have an email address! This could interfere with function format_email_recipient, but I cannot see how.

comment:8 follow-up: Changed 3 years ago by alec

Yes, comma is removed in javascript before request. Please, enable console and check how looks server response for autocomplete request. We'll know if this is js or php issue.

comment:9 in reply to: ↑ 8 Changed 3 years ago by duelli

Replying to alec:

Yes, comma is removed in javascript before request. Please, enable console and check how looks server response for autocomplete request. We'll know if this is js or php issue.

Well, I am not sure what you mean by "enable console".

I found some time ago that there is a hidden config option "devel_mode" which creates a file logs/console containing performance measurements (BTW you should add/document this to config/main.inc.php.dist)

If you mean the browser javascript console there is no output from this call.


Nevertheless, I think I have come a bit closer to the problems solution. Have a look at the screenshot I will attach immediately.

It explains what the cryptic message in the reproducible screenshot contains and actually should show :-)

Changed 3 years ago by duelli

expected output for search string "12"

comment:10 Changed 3 years ago by duelli

It is "Labor 123 Le" you can read in the reproducible screenshot

comment:11 Changed 3 years ago by alec

So, is this working with "12" and not working with "123"? I was talking about debug_level=9.

comment:12 Changed 3 years ago by duelli

Ah, debug_level=9, that is a nice feature. Should be also noted in config/main.inc.php.dist

I did as you said, typed some autocompletes in a row and got:

HTTP POST: ./?_task=mail&_action=autocomplete
--------------------------------------
HTTP POST: ./?_task=mail&_action=autocomplete
--------------------------------------
this.ksearch_query_results(["Labor AU12 Lehrstuhl f\u00fcr Experimentelle Physik III <>","Labor C123 Lehrstuhl f\u00fcr Experimentelle Physik III <>","Labor C127 Lehrstuhl f\u00fcr Experimentelle Physik III <>","Labor C128 Lehrstuhl f\u00fcr Experimentelle Physik III <>"],"12");
--------------------------------------
this.ksearch_query_results(["Labor C123 Lehrstuhl f\u00fcr Experimentelle Physik III <>"],"123");
--------------------------------------
HTTP POST: ./?_task=mail&_action=autocomplete
--------------------------------------
this.ksearch_query_results(["Labor AU12 Lehrstuhl f\u00fcr Experimentelle Physik III <>","Labor C123 Lehrstuhl f\u00fcr Experimentelle Physik III <>","Labor C127 Lehrstuhl f\u00fcr Experimentelle Physik III <>","Labor C128 Lehrstuhl f\u00fcr Experimentelle Physik III <>"],"12");
--------------------------------------
HTTP POST: ./?_task=mail&_action=autocomplete
--------------------------------------
this.ksearch_query_results(["Labor C123 Lehrstuhl f\u00fcr Experimentelle Physik III <>"],"123");
--------------------------------------

At the last autocomplete I got the result from the reproducible screenshot.

comment:13 Changed 3 years ago by alec

So, looks like browser/js issue. What browser are you using? Did you try with other? I've tried with empty email field. Unable to reproduce still.

comment:14 Changed 3 years ago by alec

  • Resolution set to fixed
  • Status changed from reopened to closed

Finally, I've found a race condition. Fixed in [812abdd7].

Note: See TracTickets for help on using tickets.