[Davical-general] addressbook_address_adr not updated

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Davical-general] addressbook_address_adr not updated

Igor Looren de Jong
Hi,

I am planning to start using the CardDav functionality of davical which
is working except for storing address information.

I created an entry using CardDavMate which resulted in below VCARD
received by davical:
BEGIN:VCARD
VERSION:3.0
UID:hbmxrunf-0772-7c18-vru2-19s9lw4r3vuc
N:Doe;John;;;
FN:Doe John
REV:20140101T211132Z
item0.ADR;TYPE=HOME:;;nostreet 35;Amsterdam;;1000AA;Netherlands
item0.X-ABADR:nl
TEL;TYPE=WORK:+31 20 123 4567
EMAIL;TYPE=INTERNET;TYPE=WORK:[hidden email]
PRODID:-//Inf-IT//CardDavMATE 0.11.1//EN
END:VCARD

Using a different client (eg. iphone) I can see the email address and
telephone number, not the address information.

When looking at the DB I don't see the address information in the
addressbook_address_adr table:
$ psql davical -c 'select * from addressbook_address_adr;'
  dav_id | type | box_no | unit_no | street_address | locality | region |
postcode | country | property
--------+------+--------+---------+----------------+----------+--------+----------+---------+----------
(0 rows)

The telephone number and other information is recorded:
$ psql davical -c 'select * from addressbook_address_tel where
dav_id=1382;'
  dav_id | type |       tel       |           property
--------+------+-----------------+-------------------------------
    1382 | WORK | +31 20 123 4567 | TEL;TYPE=WORK:+31 20 123 4567
(1 row)

$ psql davical -c 'select * from addressbook_address_email where
dav_id=1382;'
  dav_id |      type       |          email          |                    
    property
--------+-----------------+-------------------------+-------------------------------------------------------
    1382 | INTERNET~|~WORK | [hidden email] |
EMAIL;TYPE=INTERNET;TYPE=WORK:[hidden email]
(1 row)


What I noticed when debugging is that the entry for the address is
deleted for update but nothing is inserted. For the other 2 tables a
delete and an insert is performed.

All I could find when searching on this was a mail on this mailing list
dating May 2011:
===
This is a bug in DAViCal's vcard parser, which doesn't handle prefixed
field names.

At present this could only have an effect on search, and I have not yet
encountered an addressbook client program that actually does search
server-side.  It needs to be fixed, though :-)
===

Where does davical store address information if not in this table?
I am using davical 1.1.2 with OSX/iOS patches.

Regards,

  Igor

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Davical-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/davical-general
Reply | Threaded
Open this post in threaded view
|

Re: addressbook_address_adr not updated

Ján Máté-2
Hi Igor,

On 01 Jan 2014, at 22:35, Igor Looren de Jong <[hidden email]> wrote:

Hi,

I am planning to start using the CardDav functionality of davical which
is working except for storing address information.

I created an entry using CardDavMate which resulted in below VCARD
received by davical:
BEGIN:VCARD
VERSION:3.0
UID:hbmxrunf-0772-7c18-vru2-19s9lw4r3vuc
N:Doe;John;;;
FN:Doe John
REV:20140101T211132Z
item0.ADR;TYPE=HOME:;;nostreet 35;Amsterdam;;1000AA;Netherlands
item0.X-ABADR:nl
TEL;TYPE=WORK:+31 20 123 4567
EMAIL;TYPE=INTERNET;TYPE=WORK:john.doe@unemployed.com
PRODID:-//Inf-IT//CardDavMATE 0.11.1//EN
END:VCARD

Using a different client (eg. iphone) I can see the email address and
telephone number, not the address information.

the format I use in CardDavMATE is exactly the same as Apple used in iOS 3, 4, 5, 6 and in OS X 10.6, 10.7, 10.8.

I just created 2 new contacts:

one on my new Macbook Pro with factory installed OS X 10.9.1 without any tweaks or custom settings … note: the country field in the new OS X is a plain text field

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.9.1//EN
N:Last;First;;;
FN:First Last
ORG:Company;
ADR;type=HOME;type=pref:;;Street;City;;Postal;Slovak Republic
UID:7ca70932-1e4f-4599-a461-a9c0d267b6ad
X-ABUID:7CA70932-1E4F-4599-A461-A9C0D267B6AD:ABPerson
END:VCARD

and one on my iOS 7.1 beta2 (ignore the wrong PRODID - it is very probably added by OS X Contacts.app during the export) … note: the country field is selected from a list of countries (iOS not allows to use plain text for country)

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.9.1//EN
N:Last;First;;;
FN:First Last
ORG:Company;
item1.ADR;type=HOME;type=pref:;;Street;City;;Postal;Slovakia
item1.X-ABADR:sk
UID:E6C2C0E4-EE3F-458F-B5A1-210046AC968D
X-ABUID:C8E2E6D6-7F42-4313-8BC0-5C8B9696558E:ABPerson
END:VCARD

and the same contact created by CardDavMATE 0.11.1:

BEGIN:VCARD
VERSION:3.0
UID:5r7i1xrq-sa0a-f5nl-j9u3-rex2du6cjnew
N:Last;First;;;
FN:First Last
REV:20140101T231415Z
ORG:Company
item0.ADR;TYPE=HOME:;;Street;City;;Postal;Slovak Republic
item0.X-ABADR:sk
PRODID:-//Inf-IT//CardDavMATE 0.11.1//EN
END:VCARD


as you can see, there are only few differences:

1.) Apple always adds “;type=pref” for the first attribute of given type (first phone number, first address, …) … RFC2426 says that the “pref” type is optional
2.) Apple uses inconsistent country definition (plain text field on OS X, list of countries in iOS) ... iOS still uses grouping attribute for ADR and X-ABADR; the real country is stored in X-ABADR because the ADR field can contain the country name in different languages (e.g.: EN:Germany, DE:Deutchland, …)
3.) Apple changed some country strings in iOS 7 (ADR attribute), because iOS 6 string for SK was “Slovak Republic”, iOS 7 string is now “Slovakia”


We use iOS 7 with DAViCal and our CRM (contacts created by CardDavMATE /integrated into CRM/) and we have NO problems with ADR fields. 


When looking at the DB I don't see the address information in the
addressbook_address_adr table:
$ psql davical -c 'select * from addressbook_address_adr;'
 dav_id | type | box_no | unit_no | street_address | locality | region |
postcode | country | property
--------+------+--------+---------+----------------+----------+--------+----------+---------+----------
(0 rows)

The telephone number and other information is recorded:
$ psql davical -c 'select * from addressbook_address_tel where
dav_id=1382;'
 dav_id | type |       tel       |           property
--------+------+-----------------+-------------------------------
   1382 | WORK | +31 20 123 4567 | TEL;TYPE=WORK:+31 20 123 4567
(1 row)

$ psql davical -c 'select * from addressbook_address_email where
dav_id=1382;'
 dav_id |      type       |          email          |                    
   property
--------+-----------------+-------------------------+-------------------------------------------------------
   1382 | INTERNET~|~WORK | [hidden email] |
EMAIL;TYPE=INTERNET;TYPE=WORK:john.doe@unemployed.com
(1 row)


What I noticed when debugging is that the entry for the address is
deleted for update but nothing is inserted. For the other 2 tables a
delete and an insert is performed.

All I could find when searching on this was a mail on this mailing list
dating May 2011:
===
This is a bug in DAViCal's vcard parser, which doesn't handle prefixed
field names.

yes, it is true, but I’m not sure whether the current approach is worth any fixes because thanks to PostgreSQL 9.3 it is now possible to use regular expression indexing. So instead of storing attribute values in different tables for faster search it is possible to use/search directly the caldav_data table (caldav_data column /raw data/) with proper regex indexes (much faster and simpler than maintaining a ton of tables).


JM


At present this could only have an effect on search, and I have not yet
encountered an addressbook client program that actually does search
server-side.  It needs to be fixed, though :-)
===

Where does davical store address information if not in this table?
I am using davical 1.1.2 with OSX/iOS patches.

Regards,

 Igor

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Davical-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/davical-general


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Davical-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/davical-general
Reply | Threaded
Open this post in threaded view
|

Re: addressbook_address_adr not updated

Igor Looren de Jong
Hi Jan,

Thanks for your response.

I did some more tests and found a client showing the ADR entries in the
vcards (eM Client). I then found the ADR entries back in the caldav_data
table. I am also able to store pictures which concludes to me the entire
vcard gets recorded as presented to davical.

This ADR line works, both iOS and CardDavMATE:
ADR;TYPE=HOME:;;nostreet 35;Amsterdam;;1000AA;Netherlands\r

These ADR lines don't show in iOS or CardDavMATE (shows as 1 line in eM
client):
item0.ADR;TYPE=HOME:;;nostreet 35;Amsterdam;;1000AA;Netherlands\r
(CardDavMATE)
item1.ADR;type=HOME;type=pref:;;Nostreet
35;Amsterdam;;1000AA;Netherland\r (iOS)

I probably have got the "wrong" branch / patches for davical.
Got it via:
$ git clone https://github.com/DAViCal/davical.git
$ cd davical
$ git checkout 03c3459

Is that the correct set of commands?

Regards,

  Igor

On 2014-01-02 00:58, Ján Máté wrote:

> Hi Igor,
>
> On 01 Jan 2014, at 22:35, Igor Looren de Jong <[hidden email]> wrote:
>
>> Hi,
>>
>> I am planning to start using the CardDav functionality of davical
>> which
>> is working except for storing address information.
>>
>> I created an entry using CardDavMate which resulted in below VCARD
>> received by davical:
>> BEGIN:VCARD
>> VERSION:3.0
>> UID:hbmxrunf-0772-7c18-vru2-19s9lw4r3vuc
>> N:Doe;John;;;
>> FN:Doe John
>> REV:20140101T211132Z
>> item0.ADR;TYPE=HOME:;;nostreet 35;Amsterdam;;1000AA;Netherlands
>> item0.X-ABADR:nl
>> TEL;TYPE=WORK:+31 20 123 4567
>> EMAIL;TYPE=INTERNET;TYPE=WORK:[hidden email] [1]
>> PRODID:-//Inf-IT//CardDavMATE 0.11.1//EN
>> END:VCARD
>>
>> Using a different client (eg. iphone) I can see the email address
>> and
>> telephone number, not the address information.
>
> the format I use in CardDavMATE is exactly the same as Apple used in
> iOS 3, 4, 5, 6 and in OS X 10.6, 10.7, 10.8.
>
> I just created 2 new contacts:
>
> one on my new Macbook Pro with factory installed OS X 10.9.1 without
> any tweaks or custom settings … note: the country field in the new
> OS X is a plain text field
>
>> BEGIN:VCARD
>> VERSION:3.0
>> PRODID:-//Apple Inc.//Mac OS X 10.9.1//EN
>> N:Last;First;;;
>> FN:First Last
>> ORG:Company;
>>
>> ADR;TYPE=HOME;TYPE=PREF:;;STREET;CITY;;POSTAL;SLOVAK REPUBLIC
>> UID:7ca70932-1e4f-4599-a461-a9c0d267b6ad
>> X-ABUID:7CA70932-1E4F-4599-A461-A9C0D267B6AD:ABPerson
>> END:VCARD
>
> and one on my iOS 7.1 beta2 (ignore the wrong PRODID - it is very
> probably added by OS X Contacts.app during the export) … note: the
> country field is selected from a list of countries (iOS not allows to
> use plain text for country)
>
>> BEGIN:VCARD
>> VERSION:3.0
>> PRODID:-//Apple Inc.//Mac OS X 10.9.1//EN
>> N:Last;First;;;
>> FN:First Last
>> ORG:Company;
>>
>> ITEM1.ADR;TYPE=HOME;TYPE=PREF:;;STREET;CITY;;POSTAL;SLOVAKIA
>> ITEM1.X-ABADR:SK
>> UID:E6C2C0E4-EE3F-458F-B5A1-210046AC968D
>> X-ABUID:C8E2E6D6-7F42-4313-8BC0-5C8B9696558E:ABPerson
>> END:VCARD
>
> and the same contact created by CardDavMATE 0.11.1:
>
>> BEGIN:VCARD
>> VERSION:3.0
>> UID:5r7i1xrq-sa0a-f5nl-j9u3-rex2du6cjnew
>> N:Last;First;;;
>> FN:First Last
>> REV:20140101T231415Z
>> ORG:Company
>>
>> ITEM0.ADR;TYPE=HOME:;;STREET;CITY;;POSTAL;SLOVAK REPUBLIC
>> ITEM0.X-ABADR:SK
>> PRODID:-//Inf-IT//CardDavMATE 0.11.1//EN
>> END:VCARD
>
> as you can see, there are only few differences:
>
> 1.) Apple always adds “;type=pref” for the first attribute of
> given type (first phone number, first address, …) … RFC2426 says
> that the “pref” type is optional
> 2.) Apple uses inconsistent country definition (plain text field on OS
> X, list of countries in iOS) ... iOS still uses grouping attribute for
> ADR and X-ABADR; the real country is stored in X-ABADR because the ADR
> field can contain the country name in different languages (e.g.:
> EN:Germany, DE:Deutchland, …)
> 3.) Apple changed some country strings in iOS 7 (ADR attribute),
> because iOS 6 string for SK was “Slovak Republic”, iOS 7 string is
> now “Slovakia”
>
> We use iOS 7 with DAViCal and our CRM (contacts created by CardDavMATE
> /integrated into CRM/) and we have NO problems with ADR fields.
>
>> When looking at the DB I don't see the address information in the
>> addressbook_address_adr table:
>> $ psql davical -c 'select * from addressbook_address_adr;'
>> dav_id | type | box_no | unit_no | street_address | locality |
>> region |
>> postcode | country | property
>>
> --------+------+--------+---------+----------------+----------+--------+----------+---------+----------
>> (0 rows)
>>
>> The telephone number and other information is recorded:
>> $ psql davical -c 'select * from addressbook_address_tel where
>> dav_id=1382;'
>> dav_id | type | tel | property
>> --------+------+-----------------+-------------------------------
>> 1382 | WORK | +31 20 123 4567 | TEL;TYPE=WORK:+31 20 123 4567
>> (1 row)
>>
>> $ psql davical -c 'select * from addressbook_address_email where
>> dav_id=1382;'
>> dav_id | type | email |
>> property
>>
> --------+-----------------+-------------------------+-------------------------------------------------------
>> 1382 | INTERNET~|~WORK | [hidden email] |
>> EMAIL;TYPE=INTERNET;TYPE=WORK:[hidden email] [1]
>> (1 row)
>>
>> What I noticed when debugging is that the entry for the address is
>> deleted for update but nothing is inserted. For the other 2 tables a
>>
>> delete and an insert is performed.
>>
>> All I could find when searching on this was a mail on this mailing
>> list
>> dating May 2011:
>> ===
>> This is a bug in DAViCal's vcard parser, which doesn't handle
>> prefixed
>> field names.
>
> yes, it is true, but I’m not sure whether the current approach is
> worth any fixes because thanks to PostgreSQL 9.3 it is now possible to
> use regular expression indexing. So instead of storing attribute
> values in different tables for faster search it is possible to
> use/search directly the caldav_data table (caldav_data column /raw
> data/) with proper regex indexes (much faster and simpler than
> maintaining a ton of tables).
>
> JM
>
>> At present this could only have an effect on search, and I have not
>> yet
>> encountered an addressbook client program that actually does search
>> server-side. It needs to be fixed, though :-)
>> ===
>>
>> Where does davical store address information if not in this table?
>> I am using davical 1.1.2 with OSX/iOS patches.
>>
>> Regards,
>>
>> Igor


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Davical-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/davical-general
Reply | Threaded
Open this post in threaded view
|

Re: addressbook_address_adr not updated

Ján Máté-2
Hi Igor,

On 03 Jan 2014, at 12:02, Igor Looren de Jong <[hidden email]> wrote:

Hi Jan,

Thanks for your response.

I did some more tests and found a client showing the ADR entries in the 
vcards (eM Client). I then found the ADR entries back in the caldav_data 
table. I am also able to store pictures which concludes to me the entire 
vcard gets recorded as presented to davical.

This ADR line works, both iOS and CardDavMATE:
ADR;TYPE=HOME:;;nostreet 35;Amsterdam;;1000AA;Netherlands\r

These ADR lines don't show in iOS or CardDavMATE (shows as 1 line in eM 
client):
item0.ADR;TYPE=HOME:;;nostreet 35;Amsterdam;;1000AA;Netherlands\r 
(CardDavMATE)
item1.ADR;type=HOME;type=pref:;;Nostreet 
35;Amsterdam;;1000AA;Netherland\r (iOS)

if there is a group ("item0.”, “item1.”) then the “group.ADR:…..” is not enough information
because there must be another line with the same group name (which extends the information
in the “group.ADR” line).

You can send me a private e-mail with example vCards and I will check where is the problem.


I probably have got the "wrong" branch / patches for davical.
Got it via:
$ git clone https://github.com/DAViCal/davical.git
$ cd davical
$ git checkout 03c3459

Is that the correct set of commands?

I use the GIT version only if Andrew confirms that it is stable (and he is offline for 1-2 months).
Currently I use the latest Debian packages from: http://debian.mcmillan.net.nz/debian/ with my
patches from: http://www.inf-it.com/davical/ + the following 2 patches (sent to mailing list on 21 Nov):
(I forgot to add them to http://www.inf-it.com/davical/ ...)


JM
 


Regards,

 Igor


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Davical-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/davical-general
Reply | Threaded
Open this post in threaded view
|

Re: addressbook_address_adr not updated

Igor Looren de Jong
Hi,

Thanks for the overview of steps to come to a working version.

There are too many places where we can grab davical/awl from. Starting from davical-1.1.1/awl-0.53 with the patches you provided in tar bal + from this mailing list I came to this working state.

Have to check state of my DB now and I can start importing my contacts.

Regards,

 Igor


On 03 Jan 2014, at 13:28, Ján Máté <[hidden email]> wrote:

Hi Igor,

On 03 Jan 2014, at 12:02, Igor Looren de Jong <[hidden email]> wrote:

Hi Jan,

Thanks for your response.

I did some more tests and found a client showing the ADR entries in the 
vcards (eM Client). I then found the ADR entries back in the caldav_data 
table. I am also able to store pictures which concludes to me the entire 
vcard gets recorded as presented to davical.

This ADR line works, both iOS and CardDavMATE:
ADR;TYPE=HOME:;;nostreet 35;Amsterdam;;1000AA;Netherlands\r

These ADR lines don't show in iOS or CardDavMATE (shows as 1 line in eM 
client):
item0.ADR;TYPE=HOME:;;nostreet 35;Amsterdam;;1000AA;Netherlands\r 
(CardDavMATE)
item1.ADR;type=HOME;type=pref:;;Nostreet 
35;Amsterdam;;1000AA;Netherland\r (iOS)

if there is a group ("item0.”, “item1.”) then the “group.ADR:…..” is not enough information
because there must be another line with the same group name (which extends the information
in the “group.ADR” line).

You can send me a private e-mail with example vCards and I will check where is the problem.


I probably have got the "wrong" branch / patches for davical.
Got it via:
$ git clone https://github.com/DAViCal/davical.git
$ cd davical
$ git checkout 03c3459

Is that the correct set of commands?

I use the GIT version only if Andrew confirms that it is stable (and he is offline for 1-2 months).
Currently I use the latest Debian packages from: http://debian.mcmillan.net.nz/debian/ with my
patches from: http://www.inf-it.com/davical/ + the following 2 patches (sent to mailing list on 21 Nov):
(I forgot to add them to http://www.inf-it.com/davical/ ...)


JM
 


Regards,

 Igor



------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Davical-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/davical-general