Developer forum

Forum » CMS - Standard features » Unable to cast object of type 'Newtonsoft.Json.Linq.JArray'

Unable to cast object of type 'Newtonsoft.Json.Linq.JArray'

Kevin O'Driscoll
Reply

DW 9.12.11

Administrators are encountering the following error in the backend when localizing and saving copied paragraphs while editing their Polish site:

Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'System.Collections.Generic.IEnumerable`1[System.String]'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'System.Collections.Generic.IEnumerable`1[System.String]'.

Stack Trace:

[InvalidCastException: Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'System.Collections.Generic.IEnumerable`1[System.String]'.]
   Dynamicweb.Controls.Legacy.Renderers.ItemListEditorRenderer.BeginEdit(ItemListEditor itemListEditor, EditorContext context) +682
   Dynamicweb.Content.Items.Editors.ItemListEditor.BeginEdit(EditorContext context) +47
   Dynamicweb.Controls.Legacy.Renderers.EditFormRenderer.RenderField(EditForm editForm, EditFormField field, TextWriter output) +852
   Dynamicweb.Controls.Legacy.Renderers.EditFormRenderer.RenderFieldsByGroup(EditForm editForm, Func`2 selector, TextWriter output, Dictionary`2 groupNameToGroup, Dictionary`2 groupToFields) +1138
   Dynamicweb.Controls.Legacy.Renderers.EditFormRenderer.RenderFields(EditForm editForm, Func`2 selector, TextWriter output) +1567
   Dynamicweb.Content.Items.Editors.EditForm.RenderFields(TextWriter output) +166
   Dynamicweb.Controls.Legacy.Renderers.EditFormRenderer.Render(EditForm editForm, TextWriter output) +43
   Dynamicweb.Admin.ParagraphEdit.RenderFieldsAndValidators(StringBuilder initialization, EditForm form) +368
   Dynamicweb.Admin.ParagraphEdit.Page_PreRender(Object sender, EventArgs e) +1077
   System.Web.UI.Control.OnPreRender(EventArgs e) +11727996
   System.Web.UI.Control.PreRenderRecursiveInternal() +132
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3671

From the administrators:

I tried creating it myself, still crashed when I added the sources for articles. At one point I translated the paragraphs and it looked ok but I needed to change the title to Polish and then it crashed. When I looked at the live page, it was all in English like the original.

Please, could you support me? At this point I have no other options.

We tried making the changes, saving and Including and Excluding it (it worked for a moment so I could access the page). But still crashed in the end.

Anyone know whats going on here?

 


Replies

 
Kevin O'Driscoll
Reply

We also notice if we exclude the paragraphs and then include the paragraphs they work and can be edited and saved but if you open them again they error until you exclude and include again and then they work as normal until you open them again!

 

You must be logged in to post in the forum