You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Paul Leska (JIRA)" <ji...@apache.org> on 2013/11/07 04:37:18 UTC

[jira] [Commented] (CB-3035) options.multiple flag doesn't work for WP8

    [ https://issues.apache.org/jira/browse/CB-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13815609#comment-13815609 ] 

Paul Leska commented on CB-3035:
--------------------------------

This problem happened to me because one of my contacts had 2 carriage returns in the notes field and alhough the \n was being escaped the \r was not being escaped. It made the JSON incorrectly formatted which caused the code to fail invoking the script. I fixed it in Contacts.cs on line 675 by changing...

return "{" + jsonContact.Replace("\n", "\\n") + "}";
to
return "{" + jsonContact.Replace("\n", "\\n").Replace("\r", "") + "}";

Although there could be other reasons that the Json format string gets messed up. 

> options.multiple flag doesn't work for WP8
> ------------------------------------------
>
>                 Key: CB-3035
>                 URL: https://issues.apache.org/jira/browse/CB-3035
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts, WP7, WP8
>    Affects Versions: 2.3.0, 2.4.0, 2.5.0, 2.6.0
>         Environment: Visual Studio Express 2012 with Lumia 920
>            Reporter: Rohan Singhal
>            Assignee: Jesse MacFadyen
>
> Setting the "multiple" field of a "ContactFindOptions" object produces an exception "ERROR: Exception in InvokeScriptCallback :: An unknown error has occurred. Error: 80020101." Calling "navigator.contacts.find" without the "multiple" flag set works fine, and returns a single result as expected.



--
This message was sent by Atlassian JIRA
(v6.1#6144)