THIS IS ARCHIVED DOCUMENTATION

Sitecore 8.0+ Error When Saving a Coveo-Powered Search Page Using the Sitecore Rule Engine

This issue affects the following Sitecore versions:

  • 8.0 Update-6 (rev. 151127)

  • 8.0 Update-7 (rev. 160115)

  • 8.1 Update-1 (rev. 151207)

  • 8.2 initial build (rev. 160729) and later

Symptoms

When saving a Coveo-powered search page in the Experience Editor, you get the following error:

In the generated stack trace in the logs, you get an error similar to this:

29072 11:33:54 ERROR After parsing a value an unexpected character was encountered: {. Path 'scLayout', line 17, position 14.
Exception: Newtonsoft.Json.JsonReaderException
Message: After parsing a value an unexpected character was encountered: {. Path 'scLayout', line 17, position 14.
Source: Newtonsoft.Json
    at Newtonsoft.Json.JsonTextReader.ParsePostValue()
    at Newtonsoft.Json.JsonTextReader.ReadInternal()
    at Newtonsoft.Json.JsonTextReader.Read()
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
    at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
    at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
    at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
    at Sitecore.ExperienceEditor.Speak.Server.Requests.PipelineProcessorRequest`1.Process(RequestArgs requestArgs)

Cause

The problem is caused by an issue in Sitecore. It can be triggered in different ways:

  • One of your components (including Coveo components) has a field of type Rules.

  • You have added an icon to one of your tabs.

  • A parameter is changed in the Searchbox Suggestion section.

Resolution

There are ways to work around the issue.

Official Workaround

Sitecore Support can provide an official workaround. Contact them by mentioning issue 82226.

Other Workarounds

There are two other workarounds which don’t require you to contact Sitecore support.

  • Edit the Coveo-powered search pages using the Content Editor (Presentation > Details). The Content Editor isn’t affected by this issue.

  • Save the page by selecting a Coveo Component and selecting Edit Experience Editor Options. You will then be prompted to save the page, bypassing the Sitecore issue.

    It’s also possible to save the page in the Experience Editor after removing all the rules.