GNOME Bugzilla – Bug 558478
autocompletion inserts comma in the middle of the address/name
Last modified: 2010-11-20 04:57:41 UTC
Please describe the problem: If I type the user part of an email address then press <Enter> for it to auto complete, the address is expanded with a comma in the middle, turning it into two invalid addresses. Steps to reproduce: 1. Press <Ctrl>+1 to get to mail 2. Press <Ctrl>+N to create a new message 3. Type "prod<Enter>" in the To field Actual results: The To field autocompletes prod to "Aconex Production Team <blackhole@example.com>", briefly underlines it, but then changes it to "A, conex Production Team", which ceases to be underlined or a valid address. Expected results: The field expands to "Aconex Production Team <blackhole@example.com>" and stays that way. Does this happen every time? Only the first time you type "prod" in the To field for each new message. If you delete the whole line then type "prod<Enter>" a second time, it works fine. Other information: I assume it's something to do with an inability to handle a contact with three words for a first name and no middle or last name, or at least something to do with this contact. I'll attach a vCard when Bugzilla gives me an attach/upload field. Note that this only happens if you press <Enter>. If you wait for it to autocomplete, then press <Down> then <Enter>, it works OK.
Created attachment 121616 [details] vCard contact file of the contact I'm trying to autocomplete (email address changed to prevent spam)
Unable to reproduce this with Evolution 2.24.1. Can you please retest with the latest stable release?
Thanks Matthew. I'll test it when Fedora 10 preview is available.
https://bugs.edge.launchpad.net/evolution/+bug/300637 is a similar issue on 2.24.1
downstream bug comment "Example: name in Evolution address book: Jansen, Sophie Save as field in evolution: Jansen, Sophie e-mail: sophie.jansen@work.com e-mail: sophiejansen@gmail.com The work address gives the problem. If I type 'sophie' '.jansen@work.com' appears behind the cursor. If I then enter on the keyboard, I get the following: "jansen, Sophie" <sophie.>, jansen@work.com> On other addresses an enter on the keyboard will give: jansen, sophie (underlined)."
I have the same problem in Evolution 2.26.1. Say I have a contact named Harry Taylor with email htaylor@example.com. I open a new email. In the "To" field I type "hta", and the autocomplete expands it to htaylor@example.com, with everything but "hta" selected. I hit return OR tab, and it now displays: Harry Taylor <htaylor@, example.com> Or sometimes I get this: Harry Taylor <htaylor@e, xample.com> If I erase the address and do the same thing again in the same message (with the same address or any other) it works correctly. If I cancel the message and open a new one, the problem returns. If I manually fix the address, and then type another address after it, the second address will have the problem. In other words, the only way to make it stop seems to be to generate the faulty address, and then completely delete it. Any other details I can provide?
btw, the Contact entry for "Harry Taylor" is extremely simple: First: Harry Last: Taylor Email (work): htaylor@example.com
I can confirm basically the exact same problem with 2.28.0 with Fedora 12. My contact is identified by initials, I'll use xyz instead of his/her actual initials to protect the innocent. My contact is: First name: xyz File under: xyz Other Email: xyz@cobite.com When I type xyz in the "to" then press enter all is well. If I type "xyz@" then wait for the suggestion and type enter, it puts the comma in the wrong place and corrupts the address. As others have suggested, if you correct the bad address and try again all is well. My home directory (and evolution config.) was created on on an older version of evolution/fedora and migrated forward. Not sure exactly which one. In case it matters (and I think it might), I have the preference "Always show address of the autocompleted contact" checked in the Contacts preferences panel. In fact, I just set up a brand new evolution profile (for a new user), added a single contact (as above) and tried to reproduce, and was unable to do so until I checked this checkbox, and now it happens just as noted above.
Ahh, good find. Unchecking the "Always show address of the autocompleted contact" makes the problem go away for me too (2.28.1 on Ubuntu 9.10). That should help narrow the problem down anyway. I do like to be able to see the addresses, but I guess I won't for now!
Yep. Exactly same stuff happens here. I have in evolution contacts entry like 123 123123123 <123@123123123.123> And when I enter 123 it shows full string, and when I press enter. It completes address in following manner. 123,123123123 <123@123123123.123> And of course sending fails after that for recipient 123. That bug seems to work only once. If I keep email window open and try to reproduce it over and over again. It won't happen. Until I close window and open it again. It's most convincing that it's a bug because that comma won't be in same location every time. It can randomly be after first 1 or in later position. I use enter button to confirm autocompleted address, but using TAB instead of it, doesn't make any difference.
After being "up to here" with frustration for about the hundredth time, I thought I'd give it a try myself, and whaddya know, a one-liner (well maybe 5 once all is said and done). The cause: when inserting the ", " between addresses, the callback normally triggered by user input was NOT disabled which caused the logic for autocomplete to be re-entered, causing the problem. With the patch to be attached in a second, all is well for me finally. I've also patched the SPEC file (F12 spec used), and that patch will be included for your convenience. Enjoy.
Created attachment 158320 [details] [review] patch fixes the corruption issue for me.
Created attachment 158321 [details] [review] patch for the SPEC to include the previous patch during RPM build.
*** Bug 591816 has been marked as a duplicate of this bug. ***
*** Bug 626324 has been marked as a duplicate of this bug. ***
Is it possible to get an evolution developer to review the fix I atteched in comment#12? It fixes the bug which creates a disaster for: - anyone who turns on "show address for autocompleted" - anyone who has "ambiguous" contacts, causing evolution to automatically show the address to disambiguate AFAIK the patch fixes the problem, but each new update of evolution needs to be repatched etc.
Created attachment 172236 [details] [review] Patch for Not Inserting the comma in between the address. Retrieving the text of gtk_entry again as it has changed while syncing the destination. Because of which we were getting wrong ranges and comma gets inserted in between of the address.
Brilliant! That's been an issue for ages and it's fixed with a one-liner. Nice one. Please commit to gnome-2-32 and master branches.
Comment on attachment 172236 [details] [review] Patch for Not Inserting the comma in between the address. Neat fix. Committed to both master and stable.
*** Bug 635293 has been marked as a duplicate of this bug. ***