6.0.0-beta1
7/5/25

[#14673] Handling bad VCARD format from the iPhone.
Summary Handling bad VCARD format from the iPhone.
Queue Turba
Queue Version 4.2.18
Type Enhancement
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester budaycsaba (at) gmail (dot) com
Created 07/29/2017 (2898 days ago)
Due
Updated 09/27/2017 (2838 days ago)
Assigned
Resolved 09/27/2017 (2838 days ago)
Milestone 5.0.0
Patch Yes

History
09/27/2017 09:34:02 AM Jan Schneider State ⇒ Resolved
 
08/03/2017 07:40:29 PM Jan Schneider Comment #5
Assigned to Jan Schneider
State ⇒ Feedback
Milestone ⇒ 5.0.0
Reply to this comment
Since this is a major change in how we add contacts to the backend, I 
won't backport it for now. Maybe at some later point after it proved 
to not introduce any regressions.
08/03/2017 07:38:46 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit 606eeaec2bfddec095c078606d5ad482580fa1e0
Author: Jan Schneider <jan@horde.org>
Date:   Thu Aug 3 21:33:31 2017 +0200

     Catch all attributes that don't match exactly.

     Extend solution for bug #14301 to keep all email, phone, and 
address type attributes and try to store them to a different attribute 
of the same type, if the detected attribute doesn't map to an existing 
field in the backend.

     Bug: 14673

  turba/docs/CHANGES   |  2 ++
  turba/lib/Driver.php | 38 +++++++++++++-------
  turba/lib/Object.php | 97 
+++++++++++++++++++++++++++++-----------------------
  turba/package.xml    |  2 ++
  4 files changed, 83 insertions(+), 56 deletions(-)

http://github.com/horde/horde/commit/606eeaec2bfddec095c078606d5ad482580fa1e0
08/03/2017 07:38:45 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit 8f551adb50f4d1d04e81a0bd1b6597f81b44533e
Author: Jan Schneider <jan@horde.org>
Date:   Thu Aug 3 21:26:41 2017 +0200

     Add test which doesn't exhibit bug #14673 though.

  turba/test/Turba/Unit/ImportTest.php | 20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)

http://github.com/horde/horde/commit/8f551adb50f4d1d04e81a0bd1b6597f81b44533e
07/29/2017 12:24:58 PM budaycsaba (at) gmail (dot) com Comment #2 Reply to this comment
Sorry, I forgot to mention that the diff is for turba/lib/Driver.php

[Show Quoted Text - 20 lines]
07/29/2017 05:30:28 AM budaycsaba (at) gmail (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Handling bad VCARD format from the iPhone.
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ Yes
New Attachment: Hzik Zgg.vcf Download
State ⇒ New
Reply to this comment
Configuration: horde and iOS contact are kept in sync using with CardDAV.
Horde is installed from the debian distribution (debian stretch).

When adding contacts, the user may not select any "type" field for the 
telephone number, and there is no default. This breaks the VCARD 
format, see the attachment.

The problematic line is the following:
TEL;type=pref:+36303770746

This snipplet fixed this for me, by rewriting the "PREF" field to "CELL".
This may not be the most elegant fix, bit it works for me.

2307d2306
<                         $no_more_fields=true;
2311,2313d2309
<                         if ($no_more_fields && $type==='PREF') {
<                             $type='CELL';
<                         }

Saved Queries