[Tickets #9487] Re: Problem sync text/x-s4j-sifn funambol-client

noreply at bugs.horde.org noreply at bugs.horde.org
Tue Nov 18 18:30:58 UTC 2014


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/9487
------------------------------------------------------------------------------
  Ticket             | 9487
  Updated By         | horde at albasoft.com
  Summary            | Problem sync text/x-s4j-sifn funambol-client
  Queue              | Synchronization
  Version            | Git master
  Type               | Bug
  State              | Assigned
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Jan Schneider
+New Attachment     | mnemo-funambol.patch
------------------------------------------------------------------------------


horde at albasoft.com (2014-11-18 18:30) wrote:

This is still a bug in current SyncML code.
It arises when you make a new note (or modify one) at mnemo and  
trigger a sync from Funambol Client for Outlook.

When using "Funambol Outlook Sync Client Version 9.0.1", you can check  
these databases and data formats with "Details..." buttons:
  Contacs  vCard
  Calendar vCalendar
  Tasks vCalendar
  Notes SIF

Those data formats can't be modified by user.
SIF data format makes client handle "text/x-s4j-sifn" as ContentType  
for notes. All other databases make use of a well known data format,  
and avoid this bug.

Function createSyncOutput at Horde/SyncMl/Sync.php gets ContentType  
from client with:
$contentType =  
$device->getPreferredContentTypeClient($this->_targetLocURI,  
$this->_sourceLocURI);

and with funambol client for Outlook it will get "text/x-s4j-sifn".
This function will later handle additions to client with:
$c = $backend->retrieveEntry($syncDB, $suid, $ct, $fields[$ct]);
being $ct =  $contentType = "text/x-s4j-sifn".

This calls "export()" function in mnemo/lib/Api.php, which doesn't  
handle  "text/x-s4j-sifn", so you get the error and no sync gets done:
ERR: HORDE API export call for xxxx failed: Unsupported Content-Type:  
text/x-s4j-sifn

Function "getPreferredContentTypeClient" for   
Horde_SyncMl_Device_sync4j class should return some ContentType  
available in mnemo/lib/Api.php, and content will later be transformed  
with an already coded call to $device->convertServer2Client  within  
createSyncOutput().

So the attached patch extends Horde_SyncMl_Device_sync4j class with  
its own getPreferredContentTypeClient function, which will return  
"text/x-vnote" instead of "text/x-s4j-sifn".

Just one more patch:
Function vnote2sif() in Device/Sync4j.php calls 'Categories' =>  
$components[0]->getAttribute('CATEGORIES'));
But a sync of  a new mnemo note without any tag triggers an error  
(EMERG: HORDE Attribute "CATEGORIES" Not Found.) and no sync is done.

So I've also replaced that line with:
  'Categories' => $components[0]->getAttributeDefault('CATEGORIES', ''));

Hope to be usefull.



horde at albasoft.com (2014-11-18 18:30) uploaded: mnemo-funambol.patch

https://bugs.horde.org/h/services/download/?app=whups&actionID=download_file&file=mnemo-funambol.patch&ticket=9487&fn=%2Fmnemo-funambol.patch





More information about the bugs mailing list