[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformant

Hi Johan,

I tested your vCard using: http://www.inf-it.com/carddavmate/ (demo) ... after the login I entered the following code into JavaScript console (your vCard with ALL CardDavMATE data processing):

normalizeVcard(additionalRFCFixes(basicRFCFixesAndCleanup('BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Johan Vromans//NONSGML pdb2vcard 0.01//EN\r\nUID:palm-addressbook-00c57015-00003880-Johan Vromans@xxxxxxxxxxxxxxxxxxx\r\n\r\nCATEGORIES:Unfiled\r\nFN:****\r\nN:****\r\nADR;TYPE=HOME:****\r\nTEL;TYPE=HOME:*****\r\nEMAIL:******\r\nX-ALSO:*******\r\nREV:2001-07-07T13:00:00+01:00\r\nEND:VCARD\r\n').vcard));

the result:

UID:palm-addressbook-00c57015-00003880-Johan Vromans@xxxxxxxxxxxxxxxxxxx

all the vCard processing is based on the 3 functions above:

basicRFCFixesAndCleanup => fixes the biggest problems (missing \n, remove empty lines, missing required RFC attributes such as N, UID, ...)
additionalRFCFixes => fixes attribute parameters and values (RFC requirements)
normalizeVcard => transform the vCard to editor expected format (e.g. transform X-AIM to IMPP;TYPE=AIM:, ..., and remove duplicate lines /by "| sort | unique"/)

As you can see your vCard is still valid after all CardDavMATE processing ... the result is then displayed in the interface without any problems ... you can try to click to "+" (add new contact) and then enter the code below into the console (show the final vCard after all processing):

vcardToData({vcard: 'BEGIN:VCARD\r\nADR;TYPE=HOME:****\r\nCATEGORIES:Unfiled\r\nEMAIL;TYPE=INTERNET:******\r\nFN:****\r\nN:****\r\nREV:2001-07-07T13:00:00+01:00\r\nTEL;TYPE=HOME:*****\r\nUID:palm-addressbook-00c57015-00003880-Johan Vromans@xxxxxxxxxxxxxxxxxxx\r\nVERSION:3.0\r\nX-ALSO:*******\r\nEND:VCARD\r\n'}, false

So you really must have some invalid characters in your DB (maybe invisible whitespace characters?) ... try to dump the caldav_data table and then reduce the result to one of the problematic vCards and check it using hex editor ...


On 02 Dec 2013, at 17:17, Johan Vromans <jvromans@xxxxxxxxxxx> wrote:

> This is what I get from wget, with \r and \n replaced for readbility:
> BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Johan Vromans//NONSGML pdb2vcard 0.01//EN\r\nUID:palm-addressbook-00c57015-00003880-Johan Vromans@xxxxxxxxxxxxxxxxxxx\r\n \r\nCATEGORIES:Unfiled\r\nFN:****\r\nN:****\r\nADR;TYPE=HOME:****\r\nTEL;TYPE=HOME:*****\r\nEMAIL:******\r\nX-ALSO:*******\r\nREV:2001-07-07T13:00:00+01:00\r\nEND:VCARD\r\n
> This is exactly what is in the DAViCal database (table caldav_data,
> column caldav_data).
> -- Johan

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJohan Vromans <jvromans@xxxxxxxxxxx>
Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJohan Vromans <jvromans@xxxxxxxxxxx>
Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJán Máté <jan.mate@xxxxxxxxxx>
Re: [Inf-IT DAVcl] CardDAVmate: vCard not conformantJohan Vromans <jvromans@xxxxxxxxxxx>