1

Currently, we are facing an issue where the Rich Text Editor is erroring every time we try to post the values back to Sitecore. When I try to debug the post back, there is an error thrown on the DeserializeCustomData method in the PipelineArgs class. The JSON that it cannot serialize is:

{
  "$type": "Sitecore.Collections.SafeDictionary`2[[System.String, mscorlib],[System.Object, mscorlib]], Sitecore.Kernel",
  "$values": []
}

Here is the error that I'm seeing when the value is being deserialized:

{"Cannot create and populate list type Sitecore.Collections.SafeDictionary`2[System.String,System.Object]. Path '$values', line 3, position 14."}

At the moment all of our editors are the Sitecore default editors and we don't have any pipelines that are changing those pipeline arguments.

We are on Sitecore.NET version 7.2 (rev. 141226)

Are the arguments being passed correctly to the Deserialize method? I tried setting Json.Net back to the original version it was on when we first installed Sitecore, but that didn't seem to help either.

Chris Emerson
  • 13,041
  • 3
  • 44
  • 66
The Pax Bisonica
  • 2,154
  • 2
  • 26
  • 45
  • 1
    Such issue can appear if your Newtonsoft.JSON library was upgraded.Can you override Newtonsoft.Json.dll with the one from a Sitecore.NET 7.2 (rev. 141226) solution – Vlad Iobagiu Nov 09 '16 at 17:12
  • That seemed to be the issue, is there a way we can tell Sitecore to use a separate reference to Newtonsoft.Json? – The Pax Bisonica Nov 09 '16 at 17:29
  • Normally I add to the project reference to the Newtonsoft.Json.dll from the Sitecore 7.2 rev 14.11226. I will change my comment into an answer if it helped you – Vlad Iobagiu Nov 09 '16 at 17:31
  • I see, the problem we are having right now is that we have other libraries in the same solution that are dependent on newer versions of json.net – The Pax Bisonica Nov 09 '16 at 17:45
  • So I'm trying to figure out a way to manage the dependencies between sitecore and the other libraries – The Pax Bisonica Nov 09 '16 at 17:46
  • You can add a bindingredirect in your web.config. Telling all assemblies to use another version if they are willing to. See https://msdn.microsoft.com/en-us/library/eftw1fys(v=vs.110).aspx or an example: http://stackoverflow.com/questions/17236342/newtonsoft-json-assembly-package-version-mismatch – RvanDalen Nov 10 '16 at 07:32
  • Yeah the problem is we want Sitecore to use a separate version as the web project.. – The Pax Bisonica Nov 10 '16 at 14:37

0 Answers0