I started noticing this in the android 7 REV
thread. I posted one of my contacts, who lost their CATEGORIES
for no particular reason. I keep my VCARDS in a git repo, so this is easy to see (all future diffs have their personal info redacted!):
diff --git a/55cd82aa-5d0d-444e-b414-3905d2193d42.vcf b/55cd82aa-5d0d-444e-b414-3905d2193d42.vcf
index 3ae5862..1a0367f 100644
--- a/55cd82aa-5d0d-444e-b414-3905d2193d42.vcf
+++ b/55cd82aa-5d0d-444e-b414-3905d2193d42.vcf
@@ -1,13 +1,13 @@
BEGIN:VCARD
-VERSION:3.0
-PRODID:-//Sabre//Sabre VObject 4.1.1//EN
+VERSION:4.0
+PRODID:+//IDN bitfire.at//DAVdroid/1.4.0.2-ose vcard4android ez-vcard/0.10.
+ 1
UID:55cd82aa-5d0d-444e-b414-3905d2193d42
-CATEGORIES:work,friends
FN:First Name Last Name
N:Last Name;First Name;;;
TEL;TYPE=cell:+49 123 4567
EMAIL;TYPE=work:something@example.com
ORG:some org
BDAY:18000415
-REV:20170212T223553Z
-END:VCARD
\ No newline at end of file
+REV:20170215T095941Z
+END:VCARD
This just happened again, and this time I am certain that I did not accidentally click anything weird:
diff --git a/A.vcf b/A.vcf
index a5491c0..bca7a48 100644
--- a/A.vcf
+++ b/A.vcf
@@ -1,9 +1,9 @@
BEGIN:VCARD
-VERSION:3.0
-PRODID:-//Sabre//Sabre VObject 4.1.1//EN
+VERSION:4.0
+PRODID:+//IDN bitfire.at//DAVdroid/1.4.0.2-ose vcard4android ez-vcard/0.10.
+ 1
X-OPEN-XCHANGE-CTYPE:contact
UID:113db4edb1
-CATEGORIES:activity-1,friends
FN:redacted
N:redacted;redacted;;;
TEL;TYPE=cell:+49redacted
@@ -11,5 +11,5 @@ EMAIL;TYPE=home:redacted
ADR;TYPE=home;LABEL=redactedlonglinelonglinelongline
longlinecontinued
BDAY:redacted
-REV:20170212T223742Z
-END:VCARD
\ No newline at end of file
+REV:20170218T093942Z
+END:VCARD
Since this is now the second contact to show this behaviour, I could find more commonalities between the two:
Both contacts changed recently because of a Nextcloud update to Contacts 1.5.3. This update contains a fix called “Detection of potentially broken vcards with auto correction features”, which is among other things removing a (probably faulty) backslash before a comma. So both of the contacts above have recently undergone a change like this:
--- a/55cd82aa-5d0d-444e-b414-3905d2193d42.vcf
+++ b/55cd82aa-5d0d-444e-b414-3905d2193d42.vcf
@@ -1,13 +1,13 @@
BEGIN:VCARD
-VERSION:4.0
-PRODID:+//IDN bitfire.at//DAVdroid/1.3.6-ose vcard4android ez-vcard/0.10.1
+VERSION:3.0^M
+PRODID:-//Sabre//Sabre VObject 4.1.1//EN^M
UID:55cd82aa-5d0d-444e-b414-3905d2193d42
-CATEGORIES:work\,friends
+CATEGORIES:work,friends
FN:redacted
The important line being the last change from work\,friends
to work,friends
.
This is one of the related issues on this topic: https://github.com/nextcloud/contacts/issues/63
With the last update to contacts, they introduced a VCARD check & fix, and so far two of the affected contacts lost their categories when I used them afterwards. I do have a small number of contacts that should also show this behaviour, once I use them. I’d appreciate help with this bug, especially advice on how to get it fixed. I don’t know the specs well enough to even know which format is “right”, so I don’t know where to open a ticket right now.