contacts icon indicating copy to clipboard operation
contacts copied to clipboard

Remove quotes from TYPE for better external platforms compatibility

Open ghost opened this issue 7 years ago • 81 comments

This is a resubmit as I ended up doing more investigation following a switch to using Google Contacts due to this problem - during the switch, I had to manually edit the VCF file to get it to work with Gmail.

The VCF file produced by Contacts doesn't use fields recognised by other applications and appears to be non-standard. As it currently stands, it appears Contacts is incompatible with all other major platforms.

Nextcloud 16.0.1, Contacts 3.1.1

Example:

  1. New contact created in the web app, with a phone number and email. The type (e.g. home, office) is left on the defaults. image

  2. The contact is downloaded through the web app (.VCF file).

  3. The file is opened in Outlook, revealing a missing phone number. image

  4. The file is imported to gmail, again revealing a missing phone number. image image

  5. Sync to iOS also reveals a missing phone number. image

  6. Opening the VCF in ATOM reveals the field names. You can see email has the type HOME but phone has (quotes included as in the file) "HOME,VOICE". image

  7. Removing ,VOICE and the quotation marks to leave the type as HOME results in Gmail and Outlook now seeing the phone number. image

ghost avatar May 23 '19 07:05 ghost

Right, we should remove the quotations for compatibility. :)

Thanks for reporting!

skjnldsv avatar May 23 '19 08:05 skjnldsv

This is also happening with the popular productivity/email program eM Client.

giddyhup avatar Aug 12 '19 15:08 giddyhup

If I read it correctly, there were fixes to https://github.com/mozilla-comm/ical.js/issues/343 but that issue hasn't been closed yet. Is there hope that the fixes find their way to Nextcloud Contacts?

giddyhup avatar Sep 10 '19 20:09 giddyhup

@giddyhup Maybe, but we really need https://github.com/mozilla-comm/ical.js/issues/343

skjnldsv avatar Sep 11 '19 05:09 skjnldsv

ACK. Understood.

giddyhup avatar Sep 11 '19 16:09 giddyhup

I looked into the topic again and would like to share my observations. According to RFC 6350 section 6.4.1 both ways to represent phone number types are okay:

The default type is "voice". These type parameter values can be specified as a parameter list (e.g., TYPE=text;TYPE=voice) or as a value list (e.g., TYPE="text,voice").

In my tests my clients support parameter lists and have problems with value lists. The issue occurs since the Contacts app changes the parameter representation. Also, something like TEL;type=CELL;type=VOICE;type=pref: 555 1234 appears as undefined phone number in the web interface. When there are modifications to the address via the web interface in the synced VCard we only find TEL;TYPE=pref:555 1234.

giddyhup avatar Oct 11 '19 14:10 giddyhup

Yes, because the library we're using does not understand multiple parameters

skjnldsv avatar Oct 11 '19 14:10 skjnldsv

Sorry, I now have the whole picture. I just went down the rabbit hole and and also found the pull request from April 5 which probably would fix it. : (

giddyhup avatar Oct 11 '19 14:10 giddyhup

The pull request has been merged! Yay!

giddyhup avatar Jan 13 '20 13:01 giddyhup

@giddyhup Do you know when it will be released?

ghost avatar Jan 14 '20 12:01 ghost

@a1pilot nope. One needs to watch the respective repository. The last release was in 2018 and the one before that was in 2016. Then it is up to the Nextcloud/contacts maintainers to include it in their release. I assume that together can take some months.

giddyhup avatar Jan 14 '20 15:01 giddyhup

Hey, there was a new release :) That‘s the best easter present this year.

Timokirch avatar Apr 12 '20 23:04 Timokirch

In this repository, package.json references ical.js v1.4 (Mozzilla's recently released version with the fix). Does this mean version 3.2.0 of the Nextcloud contacts already includes the fix? Can we close the issue?

giddyhup avatar Apr 13 '20 09:04 giddyhup

For me there are still errors if i modify a contact on an ios device and looking at the object over the web browser. image

image

Timokirch avatar Apr 13 '20 10:04 Timokirch

In this repository, package.json references ical.js v1.4 (Mozzilla's recently released version with the fix). Does this mean version 3.2.0 of the Nextcloud contacts already includes the fix? Can we close the issue?

no it means I need to release a new version :) Would you be willing to test it here?

skjnldsv avatar Apr 14 '20 09:04 skjnldsv

Please help test the new release (link in first post): https://github.com/nextcloud/contacts/pull/1579

skjnldsv avatar Apr 14 '20 10:04 skjnldsv

Is there a testing procedure? Can the respective existing app folder simply renamed and the new folder put in its place instead?

giddyhup avatar Apr 14 '20 11:04 giddyhup

You can replace the app with this archive. If anything happens, delete it and reinstall contacts through the appstore as usual :)

skjnldsv avatar Apr 14 '20 11:04 skjnldsv

Ok, I am testing. I can't tell if it is related to this release and to this issue but here it goes (just tell me if I should open a new issue).

One contact renders my Windows client (EM client) unresponsive when I try to add the downloaded vcf file manually (it won't get synced automatically).

An address appears in the web form in one field, in the vcf it appears like this: item2.ADR;type=HOME;type=pref:;;STREET;TOWN;;ZIP;COUNTRY Phone number entries appear like this: TEL;TYPE="HOME,VOICE";VALUE=UNKNOWN:+1 555 1234567

Again, I don't know if this is related to the fix. Also, the entries have also been edited under iOS and the changes may come from there.

giddyhup avatar Apr 14 '20 13:04 giddyhup

item2.ADR;type=HOME;type=pref:;;STREET;TOWN;;ZIP;COUNTRY

We don't support type pref, so it's not coming from nextcloud here. :/

Phone number entries appear like this: TEL;TYPE="HOME,VOICE";VALUE=UNKNOWN:+1 555 1234567

Same for this one, but that might be a bug, no idea. What happen if you open the contact on nextcloud? And edit it maybe?

Though this was supposed to fix the multiple types like TYPE=HOME,VOICE => TYPE=HOME,TYPE=VOICE, any similar contacts?

skjnldsv avatar Apr 14 '20 13:04 skjnldsv