Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contacts geo: URI Support uses semicolon instead of comma #1720

Open
stefan123t opened this issue Jul 30, 2020 · 7 comments
Open

Contacts geo: URI Support uses semicolon instead of comma #1720

stefan123t opened this issue Jul 30, 2020 · 7 comments
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working

Comments

@stefan123t
Copy link

stefan123t commented Jul 30, 2020

Describe the bug

First many thanks for providing the geo URI feature in NextCloud. You are once more ahead of your users and I am astonished that it is already implemented!

I checked this feature in NextCloud Contacts, it allows to add the "Ort" / Geolocation attribute to a VCard.
Unfortunately there are several shortcomings:

  1. NextCloud uses semicolon as coordinate separator: 90.000;0.000 RFC 5870 uses comma for coordinates (x,y and optional ,z) and semicolon for other optional attributes, e.g. CRS system, uncertainty

  2. The Contacts in the NextCloud UI provide a link to open in a new Window / Tab.
    It leads to https://90.000;0.000/ and an expected 404 error on my browser. According to RFC 5870 it should lead to geo:90.000,0.000 (ie. Geographic Northpole) which can be linked to the Geo Application of Choice, e.g. Gnome Maps under Linux.

  3. The NextCloud implementation in the VCard does add the GEO location tag as following
    GEO;VALUE=FLOAT:90.000,0.000
    The site https://geouri.org describes an example for different types of Geo Tags according to RFC 2426 and follows the RFC 5870 specification by preferring lowercase for geo: URIs.
    GEO;TYPE=work:geo:90.000,0.000

Would you be willing to switch to comma separator and add the geo: prefix to the VCard and Link instead of https:// ?

To Reproduce
Go to Contacts

  1. Add a Geo / "Ort" geolocation attribute to the Contact
    See the example provided for true geographic north (90.000;0.000)
  2. Click on Link icon in the Geo tag entry
  3. See error 404 https://90.000;0.000/ not found

Expected behavior
It should open a new window with geo:90.000,0.000
The new window will ask which application to open the geo URI with, e.g. Gnome Maps under Linux

Actual behavior
It directs me to https:///90.000;0.000/ and displays a error server not found

Screenshots
image

image

Server Not Found

Hmm. We’re having trouble finding that site.
We can’t connect to the server at 90.000;0.000.
If that address is correct, here are three other things you can try:
Try again later.
Check your network connection.
If you are connected but behind a firewall, check that Firefox has permission to access the Web.

Server configuration

Operating system: Linux,
Web server: Apache,
Database: MySQL,
PHP version: 7.2/3
Nextcloud version: 19
unfortunately this is not available for the average user I am testing with under User Profile > About.
Maybe a feature request would be necessary to show the NextCloud version for non-Admin users.
Contacts version: current
Updated from an older Nextcloud or fresh install: Upgrade from NextCloud 12

Client configuration

Browser: Firefox
Operating system: Linux Mint 20 Ulyana
CardDAV-clients: iOS, Thunderbird

@stefan123t stefan123t added 0. Needs triage bug Something isn't working labels Jul 30, 2020
@stefan123t
Copy link
Author

stefan123t commented Jul 30, 2020

I found the workaround myself, you need to specify the geo: URI protocol handler manually, i.e. "geo:90.000,0.000" instead of the given example "90.000;0.000"

The resulting VCard File will then contain
GEO;VALUE=FLOAT:geo:90.000,0.000

That is you simply need to update the example given.

@stefan123t
Copy link
Author

Funny the rfcProps.js model already contains a VCard 4.0 "geo:90.000,0.000" example URI.

geo: {
multiple: true,
readableName: t('contacts', 'Location'),
icon: 'icon-address',
defaultjCal: {
'3.0': [{}, 'FLOAT', '90.000;0.000'],
'4.0': [{}, 'URI', 'geo:90.000,0.000'],
},

Where can I switch my VCard version setting in the NextCloud UI ?

@stefan123t
Copy link
Author

In #1250 it was reported the separating comma in the VCF has been escaped ",".
Now comma has been replaced by a semicolon for V3 and VALUE switched to FLOAT
Before it used VALUE=URI for both V3 and V4.

Here is an example VCF in full detail:

BEGIN:VCARD
VERSION:3.0
PRODID;VALUE=TEXT:-//Apple Inc.//iPhone OS 12.4//EN
N:Name;User;;;
FN: User Name
ORG:Organization;
TEL;TYPE=pref;VALUE=UNKNOWN:+49 123 45678901
TEL;TYPE=VOICE;VALUE=UNKNOWN:+49 123 56789012
UID:12345678-dead-beef-cafe-1234567890ab
REV;VALUE=DATE-AND-OR-TIME:20200730T102815Z
GEO;VALUE=FLOAT:geo:90.000,0.000
END:VCARD

Probably NextCloud will keep the external version for backwards compatibility indefinetly, as my Phone has been upgraded from iOS 12 to 13 for quite some time ? Though I do not know how to switch from V3 to V4 for a lot of my old contacts.

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage labels Sep 6, 2020
@skjnldsv
Copy link
Member

skjnldsv commented Sep 6, 2020

Where can I switch my VCard version setting in the NextCloud UI ?

There is no such feature (yet)

@stefan123t
Copy link
Author

Thanks for the request to switch / set VCard version for all / individual Contacts. I have had multiple versions of the same VCards due to some Backup / Sync job between IPhone and Nextcloud app. The result was some had VALUE instead of Mobile, Home, IPhone labels in the original Contacts. I have manually removed and sanitized my 1500+ contacts to an unambigous 1000+ during the holidays. So i do not know how to cope with such issues either and would second the call for a Version setting for VCards/Contacts.
Thanks for this otherwise nice piece of Software!

@skjnldsv
Copy link
Member

skjnldsv commented Sep 6, 2020

Thanks for this otherwise nice piece of Software!

Thanks :)
related #492

@skjnldsv skjnldsv added this to the next major milestone Sep 7, 2020
@stefan123t
Copy link
Author

stefan123t commented Jan 25, 2021

@skjnldsv thanks for considering this for next version. Request here would be to switch/define the v3 or v4 vcard format for one or multiple (read all) vcards in nextcloud. Obviously neither the iPhone (iOS 13) nor Nextcloud will upgrade the vcard format for existing entries automagically. Only new ones are setup as v3/v4 I recall.

Also I did not see that the client could request v3/v4 with a specific header or Agent Browser header according to VCard specs. Though it might be part of the Nextcloud configuration to specify multiple Agent Strings/regex and the chosen v3/v4 format on the server?

I understood that the currently used library does not allow transparent conversions from v3 back into v2.1.

But maybe there could be a best effort option to upgrade from v2.1 to at least v3 (optional v4) during upgrade adding a Backup of existing v2.1 cards to the users files or allow its download.

Most clients should be alright with v3 nowadays, so proposing and allowing an upgrade would be great.

I found this github repo mentioned elsewhere which might be beneficial if ported from Python to JS for both upgrade from v2 to v3 and finding/removing duplicates after merging:
https://github.com/jowave/vcard2to3

@ChristophWurst ChristophWurst removed this from the next major milestone Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants