Custom labels silently discarded in contacts UI
Describe the bug
When creating a contact and adding a phone number with a custom label, the label is kept in the UI when saving, but disappears after a reload.
Steps to reproduce
- Create a new contact and set an arbitrary name
- For phone number
- click on the left-most form field with the labels (Home, Work, etc.) and type a custom string into it (e.g. "Zweithandy")
- click on the string in the select box to make the form select your custom value.
- Add a phone nunmber
- Hit save
You should now see a new contact with a single phone number. Left to the number, as label is shown "Zeithandy". This behaves as expected so far.
Now, reload the contact UI.
The custom label is gone. Instead the same phone number is shown, but the label on the left is "Home".
Expected behavior
As mentioned, the label is supposed to be kept and displayed left to the phone number.
Actual behavior
As mentioned, the label is replaced by "Home" after a reload.
Contact version
7.1.3
Operating system
NixOS 25.05
PHP engine version
PHP 8.3
Web server
Nginx
Database
PostgreSQL
Additional info
After the bug happened (i.e. after a reload), I downloaded a VCF file of the contact. It looks like this:
BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
UID:6cfa4818-7efa-4350-817b-898874f25323
FN:Jürgen Testkontakt
ADR;TYPE=HOME:;;;;;;
EMAIL;TYPE=HOME:
NEXTCLOUD1.TEL;TYPE=HOME,VOICE:+4917864254246
NEXTCLOUD1.X-ABLABEL:Zweithandy
REV;VALUE=DATE-AND-OR-TIME:20250626T104017Z
END:VCARD
More info on missing fields during sync
When contacts are edited in IOS and then are syched back to contacts, the Telephone fields will not be displayed but they are present in the database and the record can no longer been edited with the contacts app.
Example record that fails:
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
N:;;;;
FN:Autohaus Müller
ORG:Autohaus Müller;
TEL;TYPE=HOME,VOICE;VALUE=UNKNOWN:+49 1111 1234
ITEM1.ADR;TYPE=HOME,pref:;;;Bad Irgendwo;;;Deutschland
ITEM1.X-ABADR:de
X-ABSHOWAS:COMPANY
UID:18C43ECA-2436-4B7B-B64A-E87E1A4F9551
REV;VALUE=DATE-AND-OR-TIME:20250715T191344Z
END:VCARD
analysis
When I manually replace the VERSION:3.0 with VERSION:4.0 the import succeeds. It seems there is a version parser issue - it might be good to sync data from IOS in V4 or something
By the way, if you have a corrupted address book, you can export it and delete all and replace all version 3 by 4 and reimport it. Edit: It might be necessary to remove the photos while reimporting. In my case it was.
Ich have the same problem that labels set in Nextcloud Web disappear after sync
I manage contacts with 10+ phone numbers for different rooms/departments (e.g., "Reception EG", "Office 2nd Floor Left", "IT Room 4th Floor"). Custom labels are essential for usability.
Technical Details:
- Device: Samsung Galaxy S23 Ultra (Android 14)
- Nextcloud: 31.0.7
- DAVx5: Latest version
- Sync method: CardDAV via DAVx5
Workarounds Attempted:
- Standard labels only: All become "Work" - not distinguishable
- Separate contacts: 10+ separate contacts for one company is impractical
- Notes field: Becomes unmanageable with 10+ numbers
This issue makes Nextcloud Contacts unusable for business scenarios with multiple contact points per organization.