libasys / contactsplus

A Contacts App for version ownCloud 8.1 or later, lower version not supported
23 stars 4 forks source link

Sync does not work correctly when add or edit contact on web interface #109

Open rolapp opened 9 years ago

rolapp commented 9 years ago

When I add or edit a contact on the web interface, the sync of phone- and email- types not correctly. I'm using sogo-connector for thunderbird and carddav-sync for android.

On web type is home, on android type is others, on thunderbird type is work.

douple-qoutes

double-qoutes-android geaendert

double-quotes-tb

I have testing something and found the solution.

VERSION:3.0
PRODID:-//ownCloud//NONSGML Contacts Plus 1.0.9//EN
UID:0378641fdd
N:;double quotes;;;
FN:double quotes 
TEL;TYPE="HOME,VOICE";PREF=1:+49 0815 4711
END:VCARD

The quotes in the TYPE entry are the cause (TEL;TYPE="HOME,VOICE";PREF=1:+49 0815 4711) I remove the quotes in the database, it looks now like this.

VERSION:3.0
PRODID:-//ownCloud//NONSGML Contacts Plus 1.0.9//EN
UID:60ea10981b
N:;without quotes;;;
FN:without quotes 
TEL;TYPE=CELL,VOICE;PREF=1:+49 171 123 456
END:VCARD

With out quotes sync is now working correctly. without-qoutes

without-qoutes-android

without-quotes-tb

Add contact in android or thunderbird syncing is also correctly. I think the contact-editor in contactsplus add the quotes in vcard. When importing the vCard, the error only occurs when multiple entries in TYPE (HOME,VOICE) or (HOME,FAX)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27157890-sync-does-not-work-correctly-when-add-or-edit-contact-on-web-interface?utm_campaign=plugin&utm_content=tracker%2F19713444&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F19713444&utm_medium=issues&utm_source=github).
rolapp commented 9 years ago

I have found the file who writes the quotes in the vCard. 3rdparty/sabre/vobject/lib/Parameter.php this funktion.

public function serialize()

In the comments of the function is this link. https://tools.ietf.org/html/rfc6868 rfc6868 is for vcard4.0 ? If I edit a contact photo the entry in vcard is like this: PHOTO;ENCODING=b;TYPE=image/jpeg: Thunderbird can't open the photo. This is also vcard4.0 ? But we use vCard 3.0 Maybe the sabre app is thinking we use vcard4.0, this is the problem!

mpfries commented 9 years ago

Same problem with Iphone syncing. I've added screenshots of what is entered in the web interface (1st picture) and how it looks like @ iPhone 6 S (2nd picture):

web1

iphone1