Developer forum

Forum » CMS - Standard features » Error during serialization or deserialization using the JSON JavaScriptSerializer

Error during serialization or deserialization using the JSON JavaScriptSerializer

Dan Avramescu
Reply

Hello,

I am getting this error when I try to edit a paragraph: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Here is the full stack trace: http://screencast.com/t/ijzeTaPxdj

I can't figure out the problem ... I'm guessing it has someting to do with JsTranslate. Yesterday it was working fine. I tried increasing the maxJsonLength in web.config, but there is no change

<system.web.extensions>
       <scripting>
           <webServices>
               <jsonSerialization maxJsonLength="50000000"/>
           </webServices>
       </scripting>
   </system.web.extensions>

Has anyone come across this before?

 

Thanks,

Dan


Replies

 
Nicolai Høeg Pedersen
Reply

On All paragraphs or just this one? What do you have in the ParagraphText field on the Paragraph table for this paragraph?

 
Nicolai Høeg Pedersen
Reply

Oh, wait - it is the editors confiugration. Did you configure your editor with custom JS in MC?

 
Dan Avramescu
Reply

This happens for all the paragraphs. I didn't change anything in the Editor configuration. I checked and it's using basic.js for configuration file.

 
Nicolai Høeg Pedersen
Reply

Hm. Need a link to check it out. I can have the service desk contact you or you can create a case with a URL.

Thanks, Nicolai

 
Dan Avramescu
Reply

I've already created a case. I posted on the forum also because I thought I might get a faster resolve of this error (maybe it's some setting that I've overlooked).

BR, Dan

 
Adrian Ursu
Reply

The problem dissapears if we remove one line (no matter which one) from the header of the page.

Initially we assumed it is related to a specific CSS file. It looks like no matter what we write in that header, it throws an error.

Weirdly enough, on the front-page everything is normal. No error. It might be something related to the way the back-end renders the template of the page.

Tried adding a configuration for JSONMax Length in the webconfig but it did not change anything

Adrian

 
Tymen NNM
Reply

Have you ever found a solution to this problem? We are facing the exact same problem and can not find any way to increase the maxJsonLength. As written in the topic start, configuring it in the web.config does not seem to work. What can be done about this?

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

This comes from the editor which tries to load the css of the layout template. That layout template might have something that is broken - i.e. invalud markup or maybe a ton of css includes, some with //: protocol or something like that. Try running a validator on the page where this happens.

An alterative is to create a file called Templates/Designs/Editor.css - and let the styles you want in the editor be specified there. The DW will load that instead of loading all the css files from your layout file.

BR Nicolai

Votes for this answer: 1
 
Tymen NNM
Reply

Thanks Nicolai! We chose for the second option of creating an Editor.css file. Now we can continue with making paragraphs :)

 

You must be logged in to post in the forum