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

ADR "mismatch" between vcard and GUI, formatted (LABEL) vs detailed address, leading to sync confusion #1900

Open
michaelof opened this issue Oct 29, 2020 · 7 comments
Labels
0. to triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@michaelof
Copy link

michaelof commented Oct 29, 2020

Steps to reproduce

Prereq: Existing "simple" contact, e.g. just FN set, already synched between Nextcloud and via DAVx5 to an Android device.
FYI in my case FOSS (F-Droid) App Simple-Contacts, v 6.13.0, Android 10, Nokia 7.2

  1. Change address in Simple-Contacts, make it two lines with a line break (not sure if line break is neccesary)
    FYI Simple-Contacts per design does not use detailed addresses, just one multiline address field, finally stored as ADR->STREET
  2. Sync back to Nextcloud

Remark: When contact is now downloaded from Nextcloud, NC creates NON-compliant V3.0 vcard with an ADR like

ADR;TYPE=home;LABEL="Address Changed^nin Simple-Contacts":;;Address Changed^nin Simple-Contacts;;;;

LABEL param inside ADR was introduced by RFC 6350, valid for vcard 4.0, ch. 6.3.1..
This LABEL param deprecates old v3.0 LABEL type defined in RFC 2426 ch. 3.2.2. Which had to be defined as separate vcard node, if vcard version is/should be 3.0 as used by Nextloud GUI export function.
FYI I've opened #1899 yesterday, got the impression that Nextcloud more or less is exporting V4.0 vcards although declarating them as V3.0

  1. Change address in Nextcloud

Downloaded from Nextcloud (V3.0 incompliant as described above) vcard looks as follows:

VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.3.0//EN
UID:ea51b1a6-1063-4cbd-ad42-f204cfa69763
FN:Först Last
N:Last;Först;;;
ADR;TYPE=home;LABEL="Address Changed^nin Simple-Contacts":;;geändert in Ne
 xtcloud;;;;
REV;VALUE=DATE-AND-OR-TIME:20201029T113127Z
END:VCARD

IHMO keeping the previous LABEL value without showing it in GUI is more than confusing, and hard to detect(*)!

Shown in GUI:
image

  1. Sync again
  2. Changed in Nextcloud address will NOT be shown on Android after synched via DAVx5. Both in Google Contacts App, and Simple-Contacts
    That's what I mean with (*) hard to detect: As vice versa on Android only the formatted LABEL address is shown, I thought at first that this might be a DAVx5 bug.

FYI When synched to iOS, with native cardDAV support, detailed address seems to be used by default, in contrast to Android.

Expected behaviour

If desired by design both detailed address and formatted address, as defined by RFC, should be available in Nextcloudm both have to be shown/changeable in GUI.
If LABEL is used/created en passant, so hidden by design, it should be in sync/regenerated based on detailed address, to avoid the described above confusion.

Actual behaviour

Nextcloud keeps "hidden" formatted address, unchanged

Server configuration detail

Operating system: Linux 5.3.18-lp152.47-default #1 SMP Thu Oct 15 16:05:25 UTC 2020 (41f7396) x86_64
OpenSuse Leap 15.2

Webserver: Apache (apache2handler)

Database: mysql 10.4.14

PHP version:

7.4.6
Modules loaded: Core, date, libxml, pcre, filter, hash, Reflection, SPL, session, SimpleXML, standard, xml, mysqlnd, apache2handler, apcu, bcmath, bz2, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, intl, json, ldap, exif, mysqli, openssl, pcntl, PDO, pdo_mysql, pdo_sqlite, zlib, posix, soap, sockets, sqlite3, tokenizer, xmlreader, xmlwriter, zip, Phar, Zend OPcache

Nextcloud version: 20.0.1 - 20.0.1.1

Updated from an older Nextcloud/ownCloud or fresh install:
Upgraded from Owncloud long ago

Where did you install Nextcloud from:
RPM based from OpenSuse repos

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.6.0
 - activity: 2.13.2
 - admin_audit: 1.10.0
 - audioplayer: 2.12.0
 - bruteforcesettings: 2.0.1
 - calendar: 2.1.2
 - cloud_federation_api: 1.3.0
 - comments: 1.10.0
 - contacts: 3.4.1
 - contactsinteraction: 1.1.0
 - dashboard: 7.0.0
 - dav: 1.16.0
 - encryption: 2.8.1
 - federatedfilesharing: 1.10.1
 - federation: 1.10.1
 - files: 1.15.0
 - files_external: 1.11.1
 - files_pdfviewer: 2.0.1
 - files_rightclick: 0.17.0
 - files_sharing: 1.12.0
 - files_trashbin: 1.10.1
 - files_versions: 1.13.0
 - files_videoplayer: 1.9.0
 - firstrunwizard: 2.9.0
 - issuetemplate: 0.7.0
 - logreader: 2.5.0
 - lookup_server_connector: 1.8.0
 - mail: 1.5.1
 - music: 0.17.0
 - nextcloud_announcements: 1.9.0
 - notifications: 2.8.0
 - oauth2: 1.8.0
 - password_policy: 1.10.1
 - photos: 1.2.0
 - privacy: 1.4.0
 - provisioning_api: 1.10.0
 - recommendations: 0.8.0
 - serverinfo: 1.10.0
 - settings: 1.2.0
 - sharebymail: 1.10.0
 - spreed: 10.0.1
 - support: 1.3.0
 - survey_client: 1.8.0
 - systemtags: 1.10.0
 - tasks: 0.13.5
 - text: 3.1.0
 - theming: 1.11.0
 - twofactor_backupcodes: 1.9.0
 - twofactor_totp: 5.0.0
 - updatenotification: 1.10.0
 - user_status: 1.0.0
 - viewer: 1.4.0
 - weather_status: 1.0.0
 - workflowengine: 2.2.0
Disabled:
 - user_ldap

Configuration (config/config.php)
{
    "updatechecker": false,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost:10080",
        "***REMOVED SENSITIVE VALUE***",
        "***REMOVED SENSITIVE VALUE***",
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "http:\/\/localhost:10080\/nextcloud",
    "dbtype": "mysql",
    "version": "20.0.1.1",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "logtimezone": "UTC",
    "installed": true,
    "mail_smtpmode": "sendmail",
    "mail_smtpsecure": "tls",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "appstore.experimental.enabled": true,
    "theme": "",
    "loglevel": 0,
    "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
    "log_rotate_size": 10485760,
    "app_install_overwrite": [
        "tasks",
        "contacts",
        "unsplash",
        "bruteforcesettings"
    ],
    "mysql.utf8mb4": true,
    "encryption.legacy_format_support": false,
    "encryption.key_storage_migrated": false,
    "memcache.local": "\\OC\\Memcache\\APCu"
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: 1

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36

Operating system:

Logs

Web server error log

Nextcloud log

Browser log
@michaelof michaelof added 0. to triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Oct 29, 2020
@brjhaverkamp
Copy link

I want to confirm this issue. the LABEL field is not updated correctly (read: at all) if the address field is edited. They should be kept in sync.
For my mailings, I had to creat a standalone script to fix this for each vcard, so I can import them into Glabels to print address stickers.
It would be great if this functionality can be integrated in the Contacts app.

@binaryhq
Copy link

@brjhaverkamp why do you think the address and label should sync? As per the RFC example,

ADR;GEO="geo:12.3457,78.910";LABEL="Mr. John Q. Public, Esq.\n
      Mail Drop: TNE QB\n123 Main Street\nAny Town, CA  91921-1234\n
      U.S.A.":;;123 Main Street;Any Town;CA;91921-1234;U.S.A.

the label is not synched with the address. The LABEL is free text and optional.
What Nextcloud is missing is the input to modify the Label value and other address params

ADR-param = "VALUE=text" / label-param / language-param
               / geo-parameter / tz-parameter / altid-param / pid-param
               / pref-param / type-param / any-param

@rfc2822
Copy link
Contributor

rfc2822 commented Aug 15, 2022

This problem occurs from time to time; also with another server's Web UI for contacts.

I wonder whether it would be the best solution on DAVx5 side that it should parse incoming LABELs, but shouldn't generate LABEL at all. It's redundant information, and the effects are:

  • there's in theory some data loss about the formatting of the address (relevant if you want to print postal labels ore something like that)
  • in reality, it removes confusion and restores expected user behavior

What do you think about that? Or do you have other suggestions how DAVx5 could improve compatibility with Nextcloud (and other servers) in that matter?

@brjhaverkamp
Copy link

I don't think that is the best solution.
DAVx5 should be as transparent as possible, and pass on any LABEL that it encounters.

But I would like to have an option that Nextcloud Contacts is intelligent enough to update the LABEL tag from the address field.
This should be based on a little database of international address formats, so the formatted label is in the users localization.

@Redsandro
Copy link

This issue seems to be a duplicate of #1667.

@rfc2822
Copy link
Contributor

rfc2822 commented Sep 27, 2022

Further versions of DAVx⁵ won't send the LABEL anymore (not only of this issue, but because formatted addresses don't work well on Android anway), which should also avoid this problem here when DAVx⁵ is used (however not with other CalDAV clients which still may send a LABEL).

If anyone is interested in testing, please let me know.

@brjhaverkamp
Copy link

That looks like a good solution to not break the formatted label in Nextcloud.
But then still expanding the GUI in NextCloud to edit manually (or semi automatically from the address) the label would be the ideal endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. to triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants