6.0.0-beta1
7/19/25

[#12427] No UID field returned on vCards
Summary No UID field returned on vCards
Queue Turba
Queue Version 4.1.0
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester josh (at) ha (dot) cr
Created 07/03/2013 (4399 days ago)
Due
Updated 07/16/2013 (4386 days ago)
Assigned 07/04/2013 (4398 days ago)
Resolved 07/16/2013 (4386 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/16/2013 04:28:47 PM Jan Schneider Comment #8
State ⇒ Resolved
Reply to this comment
With those changes the OSX addressbook on 10.7 works perfectly fine.
07/16/2013 04:28:12 PM Git Commit Comment #7 Reply to this comment
Changes have been made in Git (master):

commit 87436085086ce875c352d41f8d9ff3fe2f10b3d5
Author: Jan Schneider <jan@horde.org>
Date:   Tue Jul 16 18:27:48 2013 +0200

     [jan] Import and export UID vCard attributes (Bug #12427).

  turba/docs/CHANGES   |    1 +
  turba/lib/Driver.php |    8 ++++++++
  turba/package.xml    |    2 ++
  3 files changed, 11 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/87436085086ce875c352d41f8d9ff3fe2f10b3d5
07/11/2013 10:34:31 PM alberto (at) aftnet (dot) net Comment #6 Reply to this comment

[Show Quoted Text - 50 lines]
Hello again.

I'm using the latest version of OSX Mountain Lion, fully patched.
For more background information, I am hosting horde using NGINX in the 
domain's root (I have read not doing so can cause issues).

I tried using curl -X PROPFIND as you indicated on the address book's 
collection and individual vcf addresses, but every HTTP status code 
returned was 200. Directly accessing individual vcards also worked 
(UIDs were present).

I disabled the Favourites backend and would have tried syncing again 
if OSX didn't start creating Google accounts instead of Carddav ones 
when I entered my server info. I honestly don't know what's up with 
that.

07/11/2013 02:11:18 AM josh (at) ha (dot) cr Comment #5 Reply to this comment

[Show Quoted Text - 26 lines]
Hi Alberto,

Can you tell me what version of OSX you're running? I noticed during 
some of my testing that Address Book refuses to add any contacts if it 
gets an error from the server during any of its requests. In 
particular, I had trouble with a testing Horde deployment that 
included the Favourites backend with no data (it caused an HTTP 500 
status code). Once that error was returned, AB simply refused to 
continue requesting.

Perhaps your Horde or Apache logs may indicate what has happened? You 
might also try to request the vCard or DAV properties via a cURL call.

To get a list of contacts, try a command like:
curl -u username:password -X PROPFIND 
'http://server.com/yourcarddavurl/contacts%3aabcdef1234567'
I've also seen some chatter online suggesting: 
http://support.apple.com/kb/TS2481 and 
http://support.apple.com/kb/TS1627 as possible troubleshooting 
solutions.
07/10/2013 08:28:02 PM alberto (at) aftnet (dot) net Comment #4 Reply to this comment
Hello and thanks for your reply. I'm finding Horde extremely useful so 
far, so I'm glad to be of assistance.

Your patch has indeed fixed the missing UID issue, however OSX's 
address book still cannot sync.
I am attaching the relevant logs from OSX's console below.

10/07/2013 21:17:11.990 Contacts[234]: [CardDAVPlugin-ERROR] 
-_handleAddsOrModifies: exception processing addsOrModifies The value 
for 'scheme' should be non-nil and non-empty

10/07/2013 21:17:11.992 Contacts[234]: [CardDAVPlugin-ERROR] Error in 
_handleAddsOrModifies:removes:inFolderWithURL: The value for 'scheme' 
should be non-nil and non-empty

10/07/2013 21:17:11.993 Contacts[234]: [CardDAVPlugin-ERROR] 
-_handleAddsOrModifies:https://<myserveraddress>/rpc.php/addressbooks/alberto/contacts%3adjMHDzbdTiZHr86hrpZTLQ2/ Error Domain=CoreDAVErrorDomain Code=1 "The operation couldn?t be completed. (CoreDAVErrorDomain error 
1.)"

10/07/2013 21:17:11.997 Contacts[234]: [CardDAVPlugin-ERROR] Exception 
caught while running sync with server: Error Domain=CoreDAVErrorDomain 
Code=1 "The operation couldn?t be completed. (CoreDAVErrorDomain error 
1.)"

Unfortunately I have no idea what's going on this time, so I'm afraid 
I won't be of much assistance.
07/10/2013 05:51:35 AM josh (at) ha (dot) cr Comment #3
New Attachment: 0001-add-UID-field-to-vcard.patch Download
Reply to this comment
Thanks for that, Alberto. That's exactly the lead I needed to patch 
the issue. I've attached a patch that should fix it.
07/06/2013 11:31:06 PM alberto (at) aftnet (dot) net Comment #2 Reply to this comment
I am having exactly the same issue myself.

I have tried digging around in the code and noticed that the toVcard 
function in turba/lib/Driver.php has no reference at all to UIDs. If 
my understanding that that is the function responsible for generating 
the vcard's text is correct, it should be a matter of adding 
appropriate code there.
07/04/2013 02:57:10 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
07/03/2013 05:15:34 PM josh (at) ha (dot) cr Comment #1
Milestone ⇒
State ⇒ Unconfirmed
Patch ⇒ No
Queue ⇒ Turba
Summary ⇒ No UID field returned on vCards
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
I've been having trouble syncing Turba's address books with Mac OSX 
"Address Book" application. The console log indicates that the UID 
field is missing. Now I'm noticing that none of the vCards that come 
over CardDAV include a UID field.

For example, in my LDAP address book I created a new contact and then 
fetched the vCard via curl:

$ curl -u username:password 
'http://example.com/rpc/addressbooks/username/contacts%3alocalldap/cn%3dTest%20Testington%2cou%3dGlobal%20Directory%2cdc%3dexample%2cdc%3dcom.vcf'

BEGIN:VCARD
VERSION:3.0
FN:Test Testington
EMAIL;TYPE=INTERNET:test@email.com
TEL;TYPE=HOME,VOICE:
TEL;TYPE=WORK,VOICE:
TEL;TYPE=CELL,VOICE:
LABEL;TYPE=HOME:
N:Testington;Test;;;
ADR;TYPE=HOME:;;;;;;
END:VCARD


I made sure that my backends.local.php includes a map for __uid => dn. 
This is the complete config for this address book:

$cfgSources['localldap']['disabled'] = false;
$cfgSources['localldap']['title'] = 'Shared Contacts';
$cfgSources['localldap']['params']['server'] = 'localhost';
$cfgSources['localldap']['params']['root'] = 'ou=Global 
Directory,dc=example,dc=com';
$cfgSources['localldap']['params']['bind_dn'] = 
'cn=Manager,dc=example,dc=com';
$cfgSources['localldap']['params']['bind_password'] = '*****';
$cfgSources['localldap']['params']['sizelimit'] = 0;
$cfgSources['localldap']['params']['checkrequired'] = true;
$cfgSources['localldap']['params']['objectclass'][] = 'turbaContact';
$cfgSources['localldap']['params']['objectclass'][] = 'calEntry';
$cfgSources['localldap']['map']['__uid'] = 'dn';
$cfgSources['localldap']['map']['__type'] = 'turbaType';
$cfgSources['localldap']['map']['__members'] = 'turbaMembers';
$cfgSources['localldap']['map']['freebusyUrl'] = 'calFBURL';


This behaviour occurs in *all* of my address books shared via CardDAV, 
though. They all have __uid mapped to some field and yet *none* of 
them provide a UID field in the vCard. This makes the OSX Address Book 
app fail to add them.


Saved Queries