A Sitecore Editor Bug When Saving Rendering Parameters

When upgrading from Sitecore 8 to 8.1 update 1 rev151207, we got an issue. In experience editor mode, The Save button is not enabled after properties modified. It happened only if the rendering parameters template is inherited from another one. These is no such issue if the rendering parameters template not inherited from anyone else.

saveerror

After checking the log, found error like this:

87680 13:25:06 ERROR After parsing a value an unexpected character was encountered:
{. Path 'scLayout', line 32, position 626.
Exception: Newtonsoft.Json.JsonReaderException
Message: After parsing a value an unexpected character was encountered: {. Path 'scLayout', line 32, position 626.
Source: Newtonsoft.Json
   at Newtonsoft.Json.JsonTextReader.ParsePostValue()
   at Newtonsoft.Json.JsonTextReader.ReadInternal()
   at Newtonsoft.Json.JsonTextReader.Read()

After research, found this is a confirmed bug in Sitecore. In “/sitecore/shell/client/Sitecore/ExperienceEditor/ExperienceEditor.js”, decodeURIComponent is being called twice. A quick fix can be done modifying to “data: decodeURIComponent(JSON.stringify(commandContext))”

It solved the problem.

Reference: http://stackoverflow.com/questions/35029713/save-return-error-in-sitecore-page-editor

This entry was posted in Information Technology, Sitecore. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s