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 |
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
<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.
only "TEL;WORK;VOICE" (There is a comma in the first string and a
semicolo in the second).
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
State ⇒ Resolved
Bug #10912).Actually I believe it is !
It's working for me.
Thanks Rene
Bug #10912).Actually I believe it is !
It's working for me.
Thanks Rene
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
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
I believe the function _hasValEnum is wrong.
It is checking keys instead of values.
attempt where we checked values instead of keys.
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.
I believe the function _hasValEnum is wrong.
It is checking keys instead of values.
attempt where we checked values instead of keys.
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
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
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
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
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
State ⇒ Feedback
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
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
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
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
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
Patch ⇒ No
State ⇒ Resolved
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
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
New Attachment: cg.patch
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ Funambol/Android don't receive homePhone and workPhone
Type ⇒ Bug
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