[Tickets #5642] Wrong datatype conversion
bugs at bugs.horde.org
bugs at bugs.horde.org
Thu Aug 16 19:03:58 UTC 2007
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=5642
-----------------------------------------------------------------------
Ticket | 5642
Created By | mrogers at perspectivedata.com
Summary | Wrong datatype conversion
Queue | SyncML
Type | Bug
State | Unconfirmed
Priority | 3. High
Owners |
-----------------------------------------------------------------------
mrogers at perspectivedata.com (2007-08-16 12:03) wrote:
Hello:
I've been having a few problems syncing between the Funambol Outlook
plugin (v6.0.14) and Horde using yesterday's cvs HEAD snapshots.
There are two errors which occur depending on whether a Funambol item's
"Data format" option is set to SIF or vCard. (using contacts for this
example)
When set to SIF the error is, "api export call for
20070814133806.krevc4i1gvy at mail.domain.ca failed: Unsupported
Content-Type: text/x-s4j-sifc," when syncing from the server to Funambol.
And, when set to vCard the error is, "Error in adding client entry:No
vCard data was found," when syncing from Funambol to the server, the
opposite direction.
It appears that SyncML is always sending data to Funambol in vCard format
even if Funambol expects it in SIF format, and vCard data from Funambol is
converted to SIF format which SyncML doesn't appear to be able to use.
I've tested (with success) by altering the following in SyncML/Sync.php:
At line 178 changed from:
if ($item->getElementType() != 'Delete') {
list($content, $contentType) =
$device->convertClient2Server($item->getContent(), $contentType);
}
to:
if ($item->getElementType() != 'Delete') {
if (stripos(strtolower($contentType), 'sif')) {
// Only convert SIF content.
list($content, $contentType) =
$device->convertClient2Server($item->getContent(), $contentType);
} else {
$content = $item->getContent();
}
}
And, at line 285 from:
$contentType =
$device->getPreferredContentTypeClient($this->_targetLocURI,
$this->_sourceLocURI);
to:
$contentType =
$device->getPreferredContentTypeClient($this->_sourceLocURI,
$this->_targetLocURI);
There was also an issue with calendars not being synced from the server to
Funambol. For this I added the following to the
getPreferredContentTypeClient function in SyncML/Device/Sync4j.php:
if (strpos(strtolower($sourceSyncURI), 'calendar') !== false) {
return 'text/x-vcalendar';
}
There may be a more elegant way to deal with this. I'm just hoping to
demonstate what seems to be causing the issues I was experiencing.
michael
More information about the bugs
mailing list