Skip to main content

Posts

Showing posts from February, 2022

Sitecore setting Rendering.HtmlEncodedFieldTypes

Problem In our Sitecore 8 solution, content authors used to add encoded values for html tags like &nbsp; etc. in Multi-line text field and it worked correctly. When the solution was upgraded to Sitecore 10, all the html tags in multi-line text field started to get rendered as plain text instead of html as in snapshot below -  Solution RENDERING - HTML ENCODED FIELD TYPES This setting specifies a pipe-separated list of field types that should be HTML encoded when rendered by the <renderField> pipeline. Default value: text|single-line text|multi-line text We found that this setting has multi-line text included now which wasnt the case in Sitecore 8 -  <setting name="Rendering.HtmlEncodedFieldTypes" value="text|single-line text|multi-line text" /> To fix this, we removed multi-line text from the value of this setting using below patch -  <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:environment="http://www.sitec

Sitecore CLI Error - Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'

  While performing dotnet sitecore ser push, I received following error- Unhandled exception: System.Exception: Unhandled exception  ---> System.AggregateException: One or more errors occurred. (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.)  ---> Newtonsoft.Json.JsonSerializationException:

Sitecore 10 CLI Error - System.NullReferenceException: Object reference not set to an instance of an object. at Sitecore.DevEx.Serialization.Client.TreeCongruencyCommandBuilder.GenerateCommands

  While running dotnet sitecore ser push, I encountered following error- Unhandled exception: System.Exception: Unhandled exception ---> System.NullReferenceException: Object reference not set to an instance of an object. at Sitecore.DevEx.Serialization.Client.TreeCongruencyCommandBuilder.GenerateCommands(TreeSpec subtree, ITreeDataStore sourceDataStore, ITreeDataStore destinationDataStore, CancellationToken cancellationToken) at Sitecore.DevEx.Serialization.Client.TreeSyncOperation.DiscoverCommands(TreeSpec subtree, TreeCongruencyCommandBuilder commandBuilder, CancellationToken cancellationToken) at Sitecore.DevEx.Serialization.Client.TreeSyncOperation.DiscoverCommands(Boolean applyAllowedPushOperations, IEnumerable MyProject.module.json file had following entry which pointed to a non-existent node in Sitecore. The node was moved to a different folder as part of a PR but the entry in MyProject.module.json was not updated. Hence the error. - { "allowedPushOperations": &quo

Error for Brightcove image in Sitecore Docker - Could not resolve type name: Brightcove.Web.Pipelines.RegisterRoutes, Brightcove.Web

This happened during one of our upgrade projects from Sitecore 8.2 to Sitecore 10.1 on dockers. We use Brightcove for videos in our solutions. We added a Brightcove image to docker-compose. After spinning up the environment using docker-compose up, we got the below error -  The reason we got this error as we missed the Brightcove dlls in our docker build folder -  These dlls were missed to be checked in to source control due to gitignore file. You man need to modify the paths in gitignore to include these files as well in source control. Hope it helps!

HOW TO DEBUG SITECORE 10.1 DOCKER BASED SOLUTION

Problem   We are upgrading from Sitecore 8.2.1 to Sitecore 10.1.1. We are moving towards containerized solution using Dockers as it is officially supported by Sitecore now. Most of the development team has worked on non-docker based Sitecore instances and are still adopting to working with containers based applications. One of the confusions pretty much every developer had was how to debug a Docker based containerized application.  Solution  Debugging container based application using Visual Studio is slightly different.  In Visual Studio, you have two options for attaching to a process in a container: Option 1: use the Containers window T o use the  Containers  window: If the  Containers  window is not showing, open it from the top  View  menu. Click  Other Windows , then  Containers . In the list of running containers, right-click on the one that you want to debug, and click  Attach to Process : The  Attach to Process  dialog appears and shows the available processes running in the c

ERROR REBUILDING INDEXES IN SITECORE 10.1 ON DOCKER

We were using docker based Sitecore 10.1 for local development. This was an upgrade project and I was working on validating the items in upgraded Sitecore 10.1 environment.  Problem I started performing some simple searches in Content Editor's search box but got no results returned even when the item existed in the content tree. I realized I have never built the SOLR indexes since I setup the environment. So I went to control panel and attempted index rebuild. I got the following error -  Job started: Index_Update_IndexName=sitecore_master_index |# Exception : System . Reflection . TargetInvocationException : Exception has been thrown by the target of an invocation. ---> SolrNet . Exceptions . SolrConnectionException : <?xml version="1.0" encoding=" UTF -8"?> <response> <lst name="response Header "> < int name="rf">1< / int > < int name="status">400< / int > < int name=&quo