Skip to main content

Posts

Showing posts with the label Sitecore

Sitecore AKS - Collection shard cluster health check completed with status Unhealthy and Health check for shard cluster is failed.

The Problem While running the installation steps for setting up Sitecore XP in AKS, we found that the CM/CD pods are not running. This was primarily due to the fact that CM/CD pods were waiting on other pods like xDBsearch to come to running state due to wait-initialization. After waiting for significant time, we found that xDBsearch pod is not coming up and it probably has an issue. Ran kubectl logs command to check xdbsearch logs and found below entries -  The Solution This error definitely implied that the shard databases have some issue. We deleted the shard databases and ran the init job again. When the init job completes, it is advisable to check logs by running kubectl logs command. This will inform if the job was successful or did it errored out at some point. Once the shard databases were recreated, we recreated the pods and this time the xdbsearch pods came up fine. Thanks for reading :)

My Contributions to Sitecore Community in 2024

Hello!! This year, I have mostly worked on Sitecore 10.1.1 as part of IT team of an accounting services organization. Due to my nature of work, I dont have exposure to different projects exploring variety of new Sitecore tools and technologies (like my other fellow MVPs have), but I have used this year to upgrade my learning and dig deeper into Sitecore XP on which I primarily work. Below are my contributions this year -  Sitecore Blogs Below are the links to all my blogs which I have published in year 2022 on Sitecore.  https://ghanendras.blogspot.com/2024/11/sitecore-installation-on-kubernetes.html https://ghanendras.blogspot.com/2024/11/sitecore-bug-502996-checkbox-rendering.html https://ghanendra-singh.vercel.app/posts/customize-sitecore-desktop https://ghanendras.blogspot.com/2024/11/sitecore-solr-error-keepererrorcode.html https://ghanendras.blogspot.com/2024/11/cannot-find-options-for.html https://ghanendras.blogspot.com/2024/11/links-db-in-sitecore-not-consistent.html ...

Installing Sitecore 10.4 on Kubernetes: A Step-by-Step Guide

Introduction Recently, a community member attempted to install Sitecore 10.4 on a Kubernetes (K8s) cluster and reached out to me regarding the challenges they faced. Despite following Sitecore's standard installation document, they encountered issues due to their limited knowledge of Kubernetes. This blog post summarizes their experience and serves as a reference for other developers in a similar situation. Steps for Installation To successfully set up a Sitecore instance in a K8s cluster, follow these detailed steps: Prerequisites Access to Azure Kubernetes Service (AKS) : Ensure you have the ability to create namespaces and clusters in AKS. Having a team member knowledgeable in Kubernetes is highly beneficial. Local Tools : Install Azure CLI, Chocolatey, and Helm on your local machine. You'll be needing these while executing commands in PowerShell. Cluster Specifications Ensure your cluster meets these specifications: Kubernetes 1.27.x or later Windows Server 2019 version 18...

Sitecore bug 502996 - Checkbox Rendering Parameter is taking value from standard values if not checked

 The Problem In a recent project based on Sitecore 10.1.4, I encountered an intriguing issue with Sitecore’s rendering parameters. Specifically, I was working with a rendering parameter template that included Checkbox fields. The standard values for these fields were set to “checked”  Observed Behavior When reading these values for a page rendering, I noticed the following behavior: Unchecking the Checkbox: The value remained “1”. Unchecking the Checkbox and adding another rendering parameter with a value: The checkbox value became null (as expected). This led me to question why the checkbox value remained “1” when unchecked, unless a value was added to the one of the rendering parameter field. The Analysis Upon further investigation and raising a support ticket with Sitecore, it was confirmed that this behavior is indeed a bug in the current Sitecore version. The checkbox rendering parameter appears to read from the standard value if unchecked, which is not the expected behav...

Sitecore Solr Error - KeeperErrorCode = Session expired for /aliases.json

 The Problem We use SOLRcloud for SOLR with Zookeeper. While performing my routine development activities, I encountered that my local SOLR instance is giving a weird error as shown in snapshot below -  The Solution We checked SOLR logs and could see error like below repeating continuously -  2024-11-10 22:31:31.216 ERROR (zkConnectionManagerCallback-7-thread-1-EventThread) [   ] o.a.s.c.LeaderElector node exists => org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists for /overseer_elect/leader at org.apache.zookeeper.KeeperException.create(KeeperException.java:126) org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists for /overseer_elect/leader at org.apache.zookeeper.KeeperException.create(KeeperException.java:126) ~[zookeeper-3.5.5.jar:3.5.5] at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) ~[zookeeper-3.5.5.jar:3.5.5] at org.apache.zookeeper.ZooKeeper.create(...

Cannot find options for the 'SitecoreIdentityJwtBearer' authentication type

The Problem We needed to disable identity server in Sitecore 10.4 instance. We followed the instructions mentioned on Sitecore portal here When we activated the \App_Config\Include\Examples\Sitecore.Owin.Authentication.IdentityServer.Disabler.config.example, we got  this error:  Cannot find options for the 'SitecoreIdentityJwtBearer' authentication type. The Solution We found that we also need to set the  authentication type  as  empty  for  GraphQL , through below configuration, when you disable the  identity server  in Sitecore. <?xml version="1.0" encoding="utf-8" ?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> <sitecore role:require="Standalone or ContentManagement"> <authoring> <graphql> <tokenValidator> <param desc="authenticationType"> <patch:delete/> ...

Links DB in Sitecore not consistent

  The Problem The Links DB, found by going to Content Editor - Navigate - Links menu, in our environments was rarely up-to-date even after full site publishes and deploys. Content authors worked on an archival project and removed many links to the page item and republished those pages but the links still kept showing up under the Links menu. The Links menu was consistently found to be unreliable when it comes to identifying where a page is linked. It made it very difficult to know when a page can be archived.  The Research - The process for accessing items under the 'Links' icon.  There are two sections in Links menu - 'Items that the selected item refer to' and 'Items that refer to the selected item' Each of these operate differently. 'Items that the selected item refer to' - retrieves data from the fields of the item in the 'Items' table of the Master database using the Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm...

XM cloud instance on Sitecore Demo portal

 Hello, Welcome to Our Sitecore XM Cloud Instance Walkthrough! Are you ready to explore the powerful capabilities of Sitecore XM Cloud? In this video, we’ll take you on an in-depth tour of the Sitecore Demo Portal, showcasing how to set up and navigate a Sitecore XM Cloud instance. Whether you’re a seasoned developer or just starting out, this walkthrough will provide valuable insights and tips to help you make the most of Sitecore’s robust features. Join us as we dive into the world of Sitecore XM Cloud and discover how it can transform your digital experience management! Happy coding! 😊

Sitecore Exception: Input string was not in a correct format.

The Problem While working on Sitecore on my local, I started getting an exception like this -    [FormatException: Input string was not in a correct format.] Here is the snapshot of the exception -  The Solution I found that I was publishing the debug and release versions of a config by mistake. They had placeholder text which needed to be replaced during transformation step in release pipelines. Since no transformation was occurring at my local instance, the config xml was broken and hence erroring out. Hope it helps you guys!

Advanced Image with Focal Point in Sitecore 10.1

In this blog, I am sharing details on an approach used for Image cropping based on focal points. Even though, there are lots of blogs talking about how to use it, but none of them shared the technical details about how it actually works, what is the idea behind building the functionality and what each configuration, code or item in Sitecore does. So I decided to share these details with the community. The Problem  In Sitecore, content authors are responsible for creating, managing, and publishing digital content across websites and digital platforms. They are also responsible for managing the images in Sitecore media library. Managing image resolutions for different devices involves creating and serving images that look sharp and load efficiently across various screen sizes and resolutions requires images to be uploaded in different resolutions cropped such that the focal point is always in center.  Content authors wanted the ability to upload a single image in an agreed up (l...

Sitecore.Caching.Generics.CustomCache - Sitecore Caching Updates

 The Problem If you are involved in an upgrade project where you were still on an older version of Sitecore like 8.2 and have a personalized cache implementation relying on Sitecore CustomCache, it is possible that you are utilizing the Sitecore.Caching.CacheManager.FindCacheByName(string name) method. This particular method assists in retrieving a cache object based on the cache name (key). You may encounter issues with the FindCacheByName(string name) method no longer functioning, which is a result of the modifications Sitecore has made in implementing cache logics. The Analysis Sitecore has implemented generics within its site caching framework. Further details can be found at the following link:  https://doc.sitecore.com/xp/en/developers/82/sitecore-experience-platform/cache-api-changes.html#changes-in-the-cachemanager-class.  As a result of this update, when utilizing the FindCacheByName() method, it is necessary to indicate the type of key, as demonstrated in the ex...

Sitecore headless Error: Invalid src prop on `next/image`, hostname is not configured under images in your `next.config.js`

 The Problem While trying to render an Image field in next js app, I got the below error on - The Solution To fix this, navigate to next.config.js in your next js app in VS Code and add the following entry in highlighted area in snapshot  -   {         protocol: 'https',         hostname: '<your hostname here>',         port: '',       }, Hope it helps you!

Sitecore Headless Error: Parse Error: Unexpected whitespace after header value

 The Problem This can occur to any developer trying to set up their first Sitecore headless next js app on local. I will skip the commands involved in setting up the app on local. When you are done setting up your next js app and execute jss start:connected to run the app, you may face the below error -  Error: Parse Error: Unexpected whitespace after header value The Solution  The whitespace after header value is something added by Feature-Policy setting in HTTP response headers in your local Sitecore instance in IIS. Delete this setting and the error shall go away - Hope it helps you!