6.0.0-beta1
7/15/25

[#10912] Funambol/Android don't receive homePhone and workPhone
Summary Funambol/Android don't receive homePhone and workPhone
Queue Turba
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester christoph.greubel (at) bufflon (dot) de
Created 01/09/2012 (4936 days ago)
Due
Updated 08/29/2012 (4703 days ago)
Assigned 01/30/2012 (4915 days ago)
Resolved 02/03/2012 (4911 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/29/2012 12:29:42 PM Git Commit Comment #24 Reply to this comment
Changes have been made in Git (master):

commit 38406ddad11e36c90a5e744410f669d479ec2c5a
Author: Jan Schneider <jan@horde.org>
Date:   Thu Feb 2 16:24:10 2012 +0100

     Three time's a charm. How about now? (Bug #10912).

  turba/lib/Driver.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/38406ddad11e36c90a5e744410f669d479ec2c5a
02/05/2012 03:37:01 PM joniw (at) t-online (dot) de Comment #23 Reply to this comment
No idea what you mean.
The funambol client anounces its capabilites for vcard with for example:

<PropParam><ParamName>TYPE</ParamName>
<ValEnum>VOICE,WORK</ValEnum>
...
<Property><PropName>EMAIL</PropName>
<PropParam><ParamName>TYPE</ParamName>
<ValEnum>INTERNET</ValEnum>
<ValEnum>INTERNET,HOME</ValEnum>
<ValEnum>INTERNET,WORK</ValEnum>

But in the sent vcard you see:

TEL;WORK;VOICE:+32145
EMAIL;INTERNET:mail1@123.de
EMAIL;HOME:mail2@123.de
EMAIL;WORK:mail3@123.de


I had a look at the vcard specification and it is ok to use the 
semocilon as the seperator between the types instead of the comma.

But for example in the EMAIL property the INTERNET type is not send to 
the client.
I just wondered if that is the right behaviour or if it should be send 
because the client might check for both types.
Actually Funambol only checks for the HOME ,WORK and INTERNET type but 
other clients might not.


02/05/2012 02:04:08 PM Jan Schneider Comment #22 Reply to this comment
Only one remark: We get some string like "TEL;VOICE,WORK" but return 
only "TEL;WORK;VOICE" (There is a comma in the first string and a 
semicolo in the second).
No idea what you mean.
02/05/2012 10:32:48 AM joniw (at) t-online (dot) de Comment #21 Reply to this comment
Sorry for the late response. Is also working here right now.

Only one remark: We get some string like "TEL;VOICE,WORK" but return 
only "TEL;WORK;VOICE" (There is a comma in the first string and a 
semicolo in the second).

Is this the right behaviour for syncml? Or should the original string be sent?

with regards

Jonathan
02/03/2012 03:50:48 PM Jan Schneider Comment #20
State ⇒ Resolved
Reply to this comment
Thanks for all the feedback and testing!
02/03/2012 02:51:32 PM szimszon (at) oregpreshaz (dot) eu Comment #19 Reply to this comment
Works for me. mobile and workphone are synced from horde to funambol.
     Three time's a charm. How about now? (Bug #10912).
Well this should be enough.
Actually I believe it is !
It's working for me.

Thanks Rene
02/03/2012 11:50:54 AM rene (dot) van (dot) den (dot) braken (at) gmail (dot) com Comment #18 Reply to this comment
     Three time's a charm. How about now? (Bug #10912).
Well this should be enough.
Actually I believe it is !
It's working for me.

Thanks Rene
02/03/2012 07:35:46 AM Git Commit Comment #17 Reply to this comment
Changes have been made in Git (develop):

commit ea059dc3cf6be488722725e3e84228dc082763e0
Author: Jan Schneider <jan@horde.org>
Date:   Thu Feb 2 16:24:10 2012 +0100

     Three time's a charm. How about now? (Bug #10912).

  turba/lib/Driver.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/ea059dc3cf6be488722725e3e84228dc082763e0
02/02/2012 03:26:18 PM Git Commit Comment #16 Reply to this comment
Changes have been made in Git (master):

commit ea059dc3cf6be488722725e3e84228dc082763e0
Author: Jan Schneider <jan@horde.org>
Date:   Thu Feb 2 16:24:10 2012 +0100

     Three time's a charm. How about now? (Bug #10912).

  turba/lib/Driver.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/ea059dc3cf6be488722725e3e84228dc082763e0
02/02/2012 03:01:23 PM rene (dot) van (dot) den (dot) braken (at) gmail (dot) com Comment #15 Reply to this comment
Unfortunatly this fix is not working.
I believe the function _hasValEnum is wrong.
It is checking keys instead of values.
That's exactly what is necessary, and what broke with my earlier 
attempt where we checked values instead of keys.
Sorry, but I still beleive its wrong.
if for instance
$fields['TEL']->Params['TYPE']->ValEnum['VOICE,WORK']
is set (as it is in the funambol case)
the function
_hasValEnum($fields['TEL']->Params['TYPE']->ValEnum, 'HOME')
is not true as I believe was the intention.
The explode will give
array[1]=VOICE
array[2]=HOME
and array_key_exists('HOME') from this array is not true !
it should be "array_value_exist", but that probably doesn't exist :-(

Greetings Rene.
Of course I could be wrong, but without my fix I got only one standaard email,
no other emails, phones, addresses etc.
With my "dirty" fix all fields are transfered to the phone.


02/02/2012 02:09:18 PM Jan Schneider Comment #14 Reply to this comment
Unfortunatly this fix is not working.
I believe the function _hasValEnum is wrong.
It is checking keys instead of values.
That's exactly what is necessary, and what broke with my earlier 
attempt where we checked values instead of keys.
02/02/2012 01:33:52 PM rvdb (at) gmail (dot) com Comment #13 Reply to this comment
Hi,

Unfortunatly this fix is not working.
I believe the function _hasValEnum is wrong.
It is checking keys instead of values.

Something like
  if (array_key_exists($type, array_fill_keys(explode(',', $key),1)))
would work.

But there is probably a better way to do this.
(I am not a php expert).

Greetings Rene

02/01/2012 08:26:09 PM Git Commit Comment #12 Reply to this comment
Changes have been made in Git (refs/heads/ajax_to_core):

commit d6308ea3ba000f53b707599fafc8855116f9df19
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 30 15:54:44 2012 +0100

     ValEnum tags in DevInf may contain comma separated values (Bug #10912).

  turba/lib/Driver.php |   83 ++++++++++++++++++++++++++++++-------------------
  1 files changed, 51 insertions(+), 32 deletions(-)

http://git.horde.org/horde-git/-/commit/d6308ea3ba000f53b707599fafc8855116f9df19
02/01/2012 08:25:50 PM Git Commit Comment #11 Reply to this comment
Changes have been made in Git (refs/heads/ajax_to_core):

commit 42b954ab4e3fd78fedaeaf06250d6d444ef4fe89
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 30 15:27:43 2012 +0100

     Revert "ValEnum tags in DevInf may contain comma separated values 
(Bug #10912)."

     ValEnum is an array.

     This reverts commit 313c70e851125e74d99959565e252dd8eb85f0f4.

  turba/lib/Driver.php |   12 ++++++------
  1 files changed, 6 insertions(+), 6 deletions(-)

http://git.horde.org/horde-git/-/commit/42b954ab4e3fd78fedaeaf06250d6d444ef4fe89
01/30/2012 06:11:07 PM Git Commit Comment #10 Reply to this comment
Changes have been made in Git (refs/heads/develop):

commit d6308ea3ba000f53b707599fafc8855116f9df19
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 30 15:54:44 2012 +0100

     ValEnum tags in DevInf may contain comma separated values (Bug #10912).

  turba/lib/Driver.php |   83 ++++++++++++++++++++++++++++++-------------------
  1 files changed, 51 insertions(+), 32 deletions(-)

http://git.horde.org/horde-git/-/commit/d6308ea3ba000f53b707599fafc8855116f9df19
01/30/2012 06:10:50 PM Git Commit Comment #9 Reply to this comment
Changes have been made in Git (refs/heads/develop):

commit 42b954ab4e3fd78fedaeaf06250d6d444ef4fe89
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 30 15:27:43 2012 +0100

     Revert "ValEnum tags in DevInf may contain comma separated values 
(Bug #10912)."

     ValEnum is an array.

     This reverts commit 313c70e851125e74d99959565e252dd8eb85f0f4.

  turba/lib/Driver.php |   12 ++++++------
  1 files changed, 6 insertions(+), 6 deletions(-)

http://git.horde.org/horde-git/-/commit/42b954ab4e3fd78fedaeaf06250d6d444ef4fe89
01/30/2012 02:55:18 PM Jan Schneider Comment #8
State ⇒ Feedback
Reply to this comment
Try that?
01/30/2012 02:55:02 PM Git Commit Comment #7 Reply to this comment
Changes have been made in Git (refs/heads/master):

commit d6308ea3ba000f53b707599fafc8855116f9df19
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 30 15:54:44 2012 +0100

     ValEnum tags in DevInf may contain comma separated values (Bug #10912).

  turba/lib/Driver.php |   83 ++++++++++++++++++++++++++++++-------------------
  1 files changed, 51 insertions(+), 32 deletions(-)

http://git.horde.org/horde-git/-/commit/d6308ea3ba000f53b707599fafc8855116f9df19
01/30/2012 02:54:56 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (refs/heads/master):

commit 42b954ab4e3fd78fedaeaf06250d6d444ef4fe89
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 30 15:27:43 2012 +0100

     Revert "ValEnum tags in DevInf may contain comma separated values 
(Bug #10912)."

     ValEnum is an array.

     This reverts commit 313c70e851125e74d99959565e252dd8eb85f0f4.

  turba/lib/Driver.php |   12 ++++++------
  1 files changed, 6 insertions(+), 6 deletions(-)

http://git.horde.org/horde-git/-/commit/42b954ab4e3fd78fedaeaf06250d6d444ef4fe89
01/21/2012 04:53:53 PM christoph (dot) greubel (at) bufflon (dot) de Comment #5 Reply to this comment
Dear Jonathan,

you are right the latest git does not synchronize homePhone and 
workPhone. I tested my patch with my setup mentioned previously and it 
worked. The code in the git try to solve the problem with different 
code than my patch (obviously to avoid lots of if statements). Thus I 
can not comment the code in the git.

Your suggestion sounds reasonable and more effective than blowing up 
the code by lots of if statements. It would be great if could find 
spare time to implement it.

with regards

Christoph Greubel
01/19/2012 09:31:48 PM joniw (at) t-online (dot) de Comment #4 Reply to this comment
It looks like the patch does not fix the problem. Since i updated to 
the latest git, the corresponding attributes are not synced any more.

After taking a deeper look in the code the problem is the the explode 
function. it is called on an array and fails.

The solution would be to do a foreach loop over the array but it is 
not very efficient.

My idea is to  build an array which contains the supported attributes 
like "CellPhone"->1 in the beginning of the ToVcard function. This is 
then used in the different switch statements.

If i have some spare time i will try to implement it.

Please give some feedback on this.

with regards

Jonathan Westerholt
01/18/2012 10:48:52 PM joniw (at) t-online (dot) de Comment #3 Reply to this comment
It looks like this also applies to the EMAIL Property:

From Funambol:

<Property><PropName>EMAIL</PropName>
<PropParam><ParamName>TYPE</ParamName>
<ValEnum>INTERNET</ValEnum>
<ValEnum>INTERNET,HOME</ValEnum>
<ValEnum>INTERNET,WORK</ValEnum>
<ValEnum>INTERNET,HOME,X-FUNAMBOL-INSTANTMESSENGER</ValEnum>
</PropParam>

with regards

Jonathan
01/12/2012 02:10:13 PM Jan Schneider Assigned to Jan Schneider
Patch ⇒ No
State ⇒ Resolved
 
01/12/2012 02:10:02 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git for this ticket:

ValEnum tags in DevInf may contain comma separated values (Bug #10912).

  1 files changed, 6 insertions(+), 6 deletions(-)
http://git.horde.org/horde-git/-/commit/313c70e851125e74d99959565e252dd8eb85f0f4
01/09/2012 08:20:42 PM christoph (dot) greubel (at) bufflon (dot) de Comment #1
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
New Attachment: cg.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ Funambol/Android don't receive homePhone and workPhone
Type ⇒ Bug
Reply to this comment
Dear Developer,

when I try to sync contacts between my Android phone (HTC Desire S) 
and Horde/turba (3.0.11-git) using Funambol (10.0.7) no homePhone and 
workPhone numbers are sent to my phone.

I tried to understand the problem. Here a short summary:
In turba/lib/Driver.php:1059 the if statement is true resulting in a 
break. The statement is true because syncing with funambol (in my 
case) in the fields variable the entry 
"$fields['TEL']->Params['TYPE']->ValEnum['HOME']" does not exist, but 
an entry "$fields['TEL']->Params['TYPE']->ValEnum['VOICE,HOME']"  do 
exists (checked by var_dump($fields) and also visible in the funambol 
logs). The same happens some lines below after "case workPhone:". Thus 
"vcard->setAttribute( 'TEL' ..." is not executed for homePhone and 
workPhone.
I am not sure if this is a bug of turba or funambol ignoring the 
standard but I attached a patch, in which  the if statement is only 
true if neither "$fields['TEL']->Params['TYPE']->ValEnum['HOME']" nor 
"$fields['TEL']->Params['TYPE']->ValEnum['VOICE,HOME']" exists.

Many thanks,

Christoph

Saved Queries