Contact groups/categories not shown in OS X Address Book after vCard import
Scenario
Migrating contacts from an external ownCloud provider to own server with ownCloud/Nextcloud.
Steps to reproduce
- OS X Address Book with some addresses with groups, stored on an ownCloud server of a provider. As expected, the groups are listed in the Address Book.
- Export vCard file in the Address Book
- Deactivate CardDAV account
- On an own Nextcloud 9.0.53 server: Import the vCard file via the Contacts app.
- OS X: Set up and activate CardDAV account for this server.
- OS X Address Book: Check if groups are listed.
...or...
-
-
- see above
-
- OS X: Activate CardDAV account for the Nextcloud server.
- OS X Address Book: Import the vCard file.
- OS X Address Book: Check if groups are listed.
Expected behaviour
- OS X Address Book shows the list of groups of the contacts on Nextcloud.
Actual behaviour
- OS X Address Book doesn't list any groups. All contacts appear in "All Contacts" only. However, in the Contacts app of the Nextcloud user interface the groups are shown as expected.
- Same behaviour noticed with the own server before migrating it from ownCloud 9.0.3 to Nextcloud 9.0.53.
Server configuration (target server)
Operating system: Linux 3.10.0-327.13.1.el7.x86_64 #1 SMP
Web server: Apache
Database: MySQL/MariaDB 9.0.53.0
PHP version: 5.6.22
Cloud version: Server of external provider: ownCloud 8.2.3 (stable) Target server: Nextcloud 9.0.53 (stable)
Contacts version: 1.3.1.0
Updated from an older ownCloud or fresh install: Target server: Manually migrated from OC 9.0.3 to Nextcloud 9.0.53
Signing status (ownCloud 9.0 and above): No errors have been found.
List of activated apps:
Target server:
- activity
- admin_audit
- bookmarks
- calendar
- comments
- contacts
- dav
- documents
- federatedfilesharing
- federation
- files
- files_external
- files_pdfviewer
- files_sharing
- files_texteditor
- files_trashbin
- files_versions
- firstrunwizard
- gallery
- news
- notes
- notifications
- password_policy
- provisioning_api
- systemtags
- tasks
- templateeditor
- theming
- updatenotification
The content of config/config.php:
Target server:
<?php
$CONFIG = array (
'instanceid' => '***',
'passwordsalt' => '***',
'secret' => '***',
'trusted_domains' =>
array (
0 => '***',
),
'datadirectory' => '/home/httpd/vhosts/***/data',
'overwrite.cli.url' => 'https://***',
'dbtype' => 'mysql',
'version' => '9.0.53.0',
'dbname' => '***',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => '***',
'dbpassword' => '***',
'logtimezone' => 'UTC',
'installed' => true,
'updater.secret' => '***',
'loglevel' => 2,
'maintenance' => false,
'htaccess.RewriteBase' => '/',
'mail_smtpmode' => 'smtp',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtphost' => '***',
'mail_smtpport' => '25',
'mail_smtpsecure' => 'tls',
'mail_from_address' => '***',
'mail_domain' => '***',
'theme' => '',
);
Are you using external storage, if yes which one: local/smb/sftp/... No
Are you using encryption: yes/no No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... No
Client configuration
Browser: Firefox 47.0
Operating system: OS X 10.10.5
CardDAV-clients: OS X Address Book 9.0
Logs
Web server error log
No errors
ownCloud log (data/owncloud.log)
No errors
vCard for testing purposes
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.10.5//EN
N:?;Thomas;;;
FN:Thomas ?
NICKNAME:Thomy
ORG:Acme Inc.;
TEL;type=WORK;type=VOICE;type=pref:+41 234 56 78 90
TEL;type=CELL;type=VOICE:+41 98 765 43 21
ADR;type=WORK;type=pref:;;;;;;Schweiz
NOTE:This is a note\n\nEmpfehlung
URL;type=WORK;type=pref:www.example.com
item1.X-ABRELATEDNAMES;type=pref:Hulahopp
item1.X-ABLabel:_$!<Friend>!$_
CATEGORIES:Jogging
UID:0b54d0f7-f21a-4f0f-906d-394f5c2082e2
X-ABUID:5DC43A6A-42CD-4EF0-BCBF-0DFC4D5A92DC:ABPerson
END:VCARD
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.10.5//EN
N:Donat;Andre;;Herr;
FN:Example GmbH
ORG:Example GmbH;
EMAIL;type=INTERNET;type=WORK;type=pref:[email protected]
TEL;type=WORK;type=VOICE;type=pref:+41 44 333 22 11
TEL;type=HOME;type=VOICE:+41 79 111 22 33
ADR;type=WORK;type=pref:;;Dorfstrasse 1;Irgendwo;;1234;Schweiz
NOTE:PC-Support
item1.URL;type=pref:http://www.example2.com
item1.X-ABLabel:_$!<HomePage>!$_
item2.X-ABRELATEDNAMES;type=pref:Andre Donat
item2.X-ABLabel:_$!<Friend>!$_
X-ABShowAs:COMPANY
UID:22158941-9a25-47d9-99eb-487906c0ba27
X-ABUID:22158941-9A25-47D9-99EB-487906C0BA27:ABPerson
END:VCARD
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.10.5//EN
N:;;;;
FN:A1 Heizungen
ORG:A1 Heizungen;
EMAIL;type=INTERNET;type=WORK;type=pref:[email protected]
TEL;type=WORK;type=VOICE;type=pref:+41 31 666 44 22
ADR;type=WORK;type=pref:;;Genferstrasse 1;Bern;;3000;Schweiz
NOTE:offen Mo-Sa
URL;type=WORK;type=pref:http://www.example3.com
item1.X-ABRELATEDNAMES;type=pref:Momo Smith
item1.X-ABLabel:_$!<Friend>!$_
X-ABShowAs:COMPANY
CATEGORIES:.Lieferanten
UID:6aab7551-cf96-4b8b-8a94-56417356b776
X-ABUID:2E611671-F2B3-43C3-A7D9-1F6B4F98CC00:ABPerson
END:VCARD
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.10.5//EN
N:Farma;Dimitri;;Frau;
FN:oha GmbH
ORG:oha GmbH;
EMAIL;type=INTERNET;type=WORK;type=pref:[email protected]
TEL;type=WORK;type=VOICE;type=pref:+41 99 777 33 00
ADR;type=WORK;type=pref:;;Beckenhofstrasse 4;Zürich;ZH;8051;Schweiz
NOTE:1. Kontakt: 2008-01-14
URL;type=WORK;type=pref:http://www.example4.com
item1.X-ABRELATEDNAMES;type=pref:Martin Mäder
item1.X-ABLabel:_$!<Friend>!$_
X-ABShowAs:COMPANY
CATEGORIES:.Lieferanten,Kunst und Gestaltung
UID:5889bfca-6b03-4fa7-b2c9-69786e028c28
X-ABUID:5889BFCA-6B03-4FA7-B2C9-69786E028C28:ABPerson
END:VCARD
Deleted all cards from the server and then imported this single card via the web UI contacts app:
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.10.5//EN
N:Test;Thomas;;;
CATEGORIES:Friends
UID:0b54d0f7-f21a-4f0f-906d-394f5c2082e2
X-ABUID:5DC43A6A-42CD-4EF0-BCBF-0DFC4D5A92DC:ABPerson
END:VCARD
Added another contact in OS X Address Book to initialise CardDAV sync.
Expected result:
- The group (category) is shown in the web UI contacts app and also in OS X Address Book.
Actual result:
- The group (category) is shown in the web UI contacts app.
- No group (category) shown in OS X Address Book.
Same result when importing the above mentioned card in OS X Address Book.
Isn't this the old issue with Apple using a different approach of creating groups? On OSX and iOS groups are actually created like contacts so they don't appear in the owncloud contacts app. To migrate to a new server properly you should eather export from owncloud and then import on the new owncloud platform OR export from the OSX address book then import on OSX after adding the new carddav-server in OSX. Or you use thunderbird with the carddav addon for the migration which works very well.
@ jankkm Thanks very much for your comment. Yes, telling from the issues on Github with OSX and contacts I conclude that OSX handles contacts a bit differently than others.
To migrate to a new server properly you should (...) export from the OSX address book then import on OSX after adding the new carddav-server in OSX.
In my case it didn't lead to the expected result, see the 2nd case in "Steps to reproduce" above. It would be great if the cloud app could handle OSX contacts seamlessly for both kinds of export/import. The less OSX users run into issues with basic functions the more they will use a cloud like ownCloud or Nextcloud. @DeepDiver1975 Thank you for fixing it.
Wouldn't it be a good approach to dynamically create a contact if there is more than one caldav address book available to be able to see them in the macOS contacts app? This automatically created contact contains all the information that are necessary to get handled as a group. Or is this not possible by this app?
The trouble with this imported vCard from the OS X Address Book is that those wrongly stored categories on the server sync to other non-Apple devices and of are stored there in the same wrong fashion as well.
What's the way out of it? a) Deactivate CalDAV on the connected devices, delete all contacts on the server and reactivate CalDAV? Will OS X be going to automatically transfer the contacts to the server or does it need be initialised? b) Special tool for exporting contacts from OS X Address Book in an ownCloud compatible format? Does it exist? c) any other ideas?
Thanks for your help.