Hello all,
I would like to ask some help/guidance on a bug that is “bugging” me for a long time, and mainly around the christmas(card) season:-)
I use glabels to print addresses on envelopes. This requires a vcf with the LABEL property correctly set. But Nextcloud contacts currently does not really handle the LABEL property very well. This is related to issue #1900
Here is a scenario I just recorded. I create a new contact for my friend John in the nextcloud web interface. When downloaded, the VCF looks like this:
BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.3.5//EN
UID:ece76f19-2364-4f87-b33f-5367436357ee
FN:John Doe
ADR;TYPE=HOME:;;Kalverstraat 1;Amsterdam;;1234 AB;
EMAIL;TYPE=HOME:
TEL;TYPE=HOME,VOICE:
REV;VALUE=DATE-AND-OR-TIME:20211215T173237Z
END:VCARD
I sync it to my android phone and realize my friend John has moved to a new address, So I edit the contact on my phone. After a sync, the contact looks like this when downloaded again from the Nextcloud web interface:
BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.3.5//EN
UID:ece76f19-2364-4f87-b33f-5367436357ee
FN:John Doe
N:Doe;John;;;
ADR;TYPE=home;LABEL=Leidse straat 2\nAmsterdam 5678 CD:;;Leidse straat 2;Am
sterdam;;5678 CD;
REV:20211215T173514Z
END:VCARD
Note that somewhere in the sync process the LABEL parameter is introduced in the ADR property. Strangely it is actually using the VCARD 4.0 syntax because in VCARD 3.0 LABEL is a separate property. (https://en.wikipedia.org/wiki/VCard or VCF - Virtual Contact File)
Later that year John moves yet again, and this time I edit his address on my laptop in the Nextcloud web interface. The vcard I download now comes out as:
BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.3.5//EN
UID:ece76f19-2364-4f87-b33f-5367436357ee
FN:John Doe
N:Doe;John;;;
ADR;TYPE=home;LABEL=“Leidse straat 2^nAmsterdam 5678 CD”:;;Dam 3;Amsterdam;
;9876 FE;
REV;VALUE=DATE-AND-OR-TIME:20211215T173853Z
END:VCARD
Note now that all the other ADR parameters are completely out of sync with the LABEL parameter.
So my card goes to the wrong(old) address when I use glabels to print my mailing.
I see two separate problems here:
-
Somewhere Nextcloud contacts seems to add the LABEL, but in a wrong syntax. I think it is Nextcloud who does this because I checked my phone by mailing the VCF, and it seems to use the VCARD 2.1 format and I didn’t see it add the LABEL parameter.
-
the Contacts app doesn’t check or keep the LABEL in sync afterwards, causing havoc in the ADR property
I would like to work on this bug and improve this part over the next period. I already downloaded the source for nextcloud app, but I first wanted to check here if anyone has more/better info.
-Do you see this problem as well.
-Is it really Nextcloud adding the LABEL?
-Where in the source should I look for this then?
- Any other ideas and pointers.
Some version info:
Nextcloud 22.2.3
Contacts app: 4.0.6
Kind Regards,
Bert