Author Topic: When added in TB, contacts inserted 1+ times on google  (Read 1402 times)

Mshrimp

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
When added in TB, contacts inserted 1+ times on google
« on: October 01, 2009, 10:54:04 PM »
Hi,

first of all: Awesome plugin! At least a great idea and so far also nearly a perfect implementation ;) (otherwise I wouldnt open this ticket, you know ;) )

When I started to experiment with this addon, I created a new blank google account, installed the addon, created a new "Google Contacts"-addressbook in TB and synced it with Google.
All (empty) contact groups of google were loaded into that new TB addressbook. I had created some custom Google contact groups, too, which have been loaded successfully as well.

So far so good.

Now I wanted to migrate my current TB contacts (which are distributed over several TB address books) into the TB contact lists of the "Google Contacts"-addressbook. So I selected contacts of the first TB addressbook ("Friends") and drag'n'dropped them into the corresponding contact list of the Google addressbook. After that I hit 'sync' and refreshed the webbrowser - voilá! X new accounts successfully transferred to Google's web-interface. Great!

Next I took my TB addressbook "Family", selected all contacts, drag'n'drop to the corresponding address list of the "Google Contacts" addressbook in TB and hit 'sync' again. Now Y new contacts were transferred to Google - HOWEVER the "Friends" Group now contained both Family and Friends (the Google web interface showed X + Y contacts).

I tried this experiment several times - always with the same result. I tried different groups, reinstalling the plugin, clearing Google contacts - nothing worked


Bug or did I miss an important point?


Regards

ms

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 453
  • Karma: +1/-0
    • Pi Rules.org
Re: When added in TB, contacts inserted 1+ times on google
« Reply #1 on: October 10, 2009, 07:52:34 PM »
Hello,

Sorry about my slow replies.  Mailing lists in Thunderbird can be very buggy at times and gContactSync uses them in a way somewhat different than they were meant to be used.  Drag and drop can be especially buggy, even more so if you do it from another address book.  Sometimes when you drag contacts they can appear to be in an address book twice until you close and reopen the address book, but that isn't the case if you can see them with Google's interface.

The safest way I've found to put contacts in mailing lists is to add them to the main address book, synchronize, and then add them to the correct groups through Google's bug-free interface.  gContactSync should then be able to synchronize correctly.  The only catch is that contacts without e-mail addresses are assigned a fake e-mail address like nobody123@nowhere.invalid which only appear in Thunderbird.  This is to prevent a bug which breaks an address book when you add contacts w/o e-mail addresses to one of it's mailing lists.

If you can find an exact sequence of events which can reproduce what you described I can try to fix or workaround it.

Josh
gContactSync: info FAQs

Mshrimp

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: When added in TB, contacts inserted 1+ times on google
« Reply #2 on: October 15, 2009, 12:06:53 PM »
Hi!

Thanks for your help! Don't mind about slow answering - I'm sure you've got better things to do since you develop gContactSync in your free time.

I will try your way to add contact on the weekend i think.

@exact sequence: The most exact sequence I can describe is the one I mentioned in my first posting. Or do you mean a sequence that doesnt involve drag&drop? Until now I always used drag&drop

@tb bug: Is the whole mailing-lists+drag&drop-bug supposed to be fixed in TB 3?


Best regards and thanks again for your help!

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 453
  • Karma: +1/-0
    • Pi Rules.org
Re: When added in TB, contacts inserted 1+ times on google
« Reply #3 on: October 16, 2009, 08:54:51 AM »
Hello,

Quote
@exact sequence: The most exact sequence I can describe is the one I mentioned in my first posting. Or do you mean a sequence that doesnt involve drag&drop? Until now I always used drag&drop
Nope, just through drag and drop.  I'll try to reproduce it and see if I can do anything about it.  If you disable gContactSync and try again with a new address book (only if you make sure that there are no contacts without e-mail addresses) does it still happen?  Again, check your contacts for e-mail addresses first.

Quote
@tb bug: Is the whole mailing-lists+drag&drop-bug supposed to be fixed in TB 3?
Unfortunately, no.  I filed a bug report here and provided one line of code that will create and 'break' an address book through a mailing list in all recent beta and pre-release versions of Thunderbird 3 and almost definitely 3.0 final.

Regards,

Josh
gContactSync: info FAQs

Mshrimp

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: When added in TB, contacts inserted 1+ times on google
« Reply #4 on: October 17, 2009, 03:30:14 PM »
Yes, i'm pretty sure that all my accounts have email addresses since i use my address book only for storing email addresses. There might be some duplicates though. But that couldnt cause any trouble, could it?

What do you mean by disabling gContactSync and try again? Until now (without gContactSync) drag and drop has worked properly. So I guess I won't have to test disabling gContactSync (since it has worked before)?

Mshrimp

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: When added in TB, contacts inserted 1+ times on google
« Reply #5 on: October 17, 2009, 04:10:14 PM »
Ok, I tested again.

Again, I removed the address book and checked out a new (empty) one from google. No contacts in google, no contacts in the gContactSync (gCS) addressbook so far. But this time I removed all custom groups from google. Just the google default groups.

Then I drag'n'dropped 2 exemplary contacts in TB into the gCS addressbook and hit "sync". It worked!
Also adding contacts to other groups worked propery.

So, could it be that your addon can't handle custom groups that are created via the Google web interface?

What I also observed: The column "name" of the synchronized address book in TB is messed up. There is the part before the "@" of an email address instead of the first/lastname. And the field "additional email address" isnt synced at all.

So I guess there's still a lot of work to do ;)


Best regards

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 453
  • Karma: +1/-0
    • Pi Rules.org
Re: When added in TB, contacts inserted 1+ times on google
« Reply #6 on: October 18, 2009, 08:46:03 PM »
Quote
There might be some duplicates though. But that couldnt cause any trouble, could it?

Duplicate e-mail addresses can cause problems with mailing lists.  The mailing list code (in Thunderbird/Seamonkey) assumes that all contacts within have a unique and non-empty e-mail address.  This makes sense based on the original intent of mailing lists, but the front-end has no checks that stop the user or extensions from not following these assumptions.

Quote
So, could it be that your addon can't handle custom groups that are created via the Google web interface?

I don't think so, all mailing lists are the same as far as drag and drop and Thunderbird as a whole is concerned, but I'll keep this in mind.  There is a Thunderbird bug (with a workaround in gContactSync) with dragging contacts into a new mailing list.

Quote
What I also observed: The column "name" of the synchronized address book in TB is messed up. There is the part before the "@" of an email address instead of the first/lastname. And the field "additional email address" isnt synced at all.

I have observed this, too, and am trying to figure it out.  The contact appears to have properties in the contact view pane (bottom half) and edit contact dialog that don't appear in the results pane (top half).

The additional e-mail address is synchronized, along with the primary and two new e-mail fields.  If you drag and drop contacts from one address book into a mailing list in another information can be lost (not sure why) and causes problems like the Display Name problem you mentioned.

I have a busy week and a couple of tests, but I hope to play around with mailing lists next weekend and see if I can add any more workarounds.  I looked through my drag and drop code and removed some unnecessary stuff but wasn't able to see anything wrong with it.  Unfortunately all or most of the problems lie in the underlying C++ code that I cannot do anything about from an extension.

Basically, if you need to add contacts from another address book, copy them to the synchronized address book, synchronize, and then organize them through Google's interface.  If you must use Thunderbird drag them to the address book first and then from that address book into the mailing list.
gContactSync: info FAQs

Mshrimp

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: When added in TB, contacts inserted 1+ times on google
« Reply #7 on: October 22, 2009, 08:21:37 AM »
Ok thank you so far! I really appreciate that you spend so much of your spare time (for free!) for this project!

I think I will wait until your next release and then start a couple of more tests.

Btw: Since mailing lists are buggy - and not used in the way it was originally intended - wouldn't it be more convenient to snychronize each Google group with a whole address book? Because I think TB address books are the real equivalent to a google group.

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 453
  • Karma: +1/-0
    • Pi Rules.org
Re: When added in TB, contacts inserted 1+ times on google
« Reply #8 on: October 27, 2009, 08:19:26 AM »
Quote
Btw: Since mailing lists are buggy - and not used in the way it was originally intended - wouldn't it be more convenient to snychronize each Google group with a whole address book? Because I think TB address books are the real equivalent to a google group.

Somewhat, but mailing lists are the closest thing Thunderbird has to Groups in Google.  When you have one contact in a few groups/mailing list there is only one copy of that contact in the entire address book.  If groups are synchronized with address books then there are potentially multiple copies of the same contact.

Version 0.3 will allow synchronizing groups with individual address books.  For each address book you can sync All Groups/All Contacts, one particular group, or all contacts but no groups.

Here's a slightly outdated preview:
gContactSync: info FAQs

Mshrimp

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: When added in TB, contacts inserted 1+ times on google
« Reply #9 on: October 27, 2009, 07:47:16 PM »
Looks great! I'm looking forward to the release!