Skip to main content

Posts

Showing posts from November, 2022

Contributions to Sitecore community in 2022

Hello All! This year I learnt many new cool stuff about Sitecore 10 especially Docker, Sitecore Publishing Service, SXA etc. I wish I could touch other products of Sitecore as well. I will try to do that in 2023.  I would take this opportunity to list what I have done this year.  BLOG POSTS Below are the links to all my blogs which I have published in year 2022 on Sitecore.  https://ghanendras.blogspot.com/2022/11/all-items-removed-from-sitecore-web-db.html https://ghanendras.blogspot.com/2022/11/limit-on-number-of-sxa-sites-sitecore.html https://ghanendras.blogspot.com/2022/11/old-versions-of-sitecore-pages-get.html https://ghanendras.blogspot.com/2022/11/related-items-not-published-in-sitecore.html https://ghanendras.blogspot.com/2022/09/replace-sxa-based-selectrendering.html https://ghanendras.blogspot.com/2022/05/sitecore-10-queues-removed-in-data.html https://ghanendras.blogspot.com/2022/03/bug-in-sitecore-10-unable-to-move-out.html https://ghanendras.blogspot.com/2022/04/sitecore

Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException in Sitecore Publishing Servie

This happened recently i n our publishing service when we started seeing below error that caused publishing to fail for items-  Mvc.ExceptionHandling.AbpExceptionFilter - Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate. Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate. On investigating, it was found that our job queue was somewhat big, and our operations table were very large. This could be what's causing this issue to occur in publishing service. We connected with Sitecore support and they recommended to modify the cleanup tasks on the publishing service side to clear these tables more often. This can be achieved by using the below patch on publishing service side -  <?xml version="1.0" encoding="utf-8"?> <Settings>   <Commands>     <Web>       <Services>         <Add> 

All items removed from Sitecore Web DB due to this bug in Sitecore Publishing Service v5

In this post, I am going to talk about a very weird issue we faced and how we troubleshooted it. One fine morning, a QA in our team updated us that she is unable to see anything on CD server. All she sees is the Sitecore aspx page with error saying layout not found. We started looking for the item in web db to find out what was wrong and phewww, web db was missing all the items we had built ever. To fix this issue temporarily, we published everything from master to web db. But this kept happening over and over. We started looking at the Publishing Dashboard to get any cues and we saw hundreds of queued jobs as in snapshot below -  These jobs seem to be getting queued automatically. We started investigating logs in Sitecore cm instance and on publishing service machine to get any traces of what is happening. We also found that our publishing service instance went unresponsive due to such large number of requests. We recycled its application pool to get it back to working state. We check

ServiceAuthorizationManager in Sitecore Powershell Extension

Everyone loves using Sitecore PowerShell Extension i.e. SPE due to the flexibility it allows to work with Sitecore. Those who are working on SXA must be already aware that SPE is a prerequisite to SXA. In fact SXA has many inbuilt scripts which help in managing the SXA tenant and sites. These SXA scripts are accessible through Scripts item that appears in an item's context menu.  Note - Context menu is menu that opens up when you right click on an item (as in snapshot below). So far so good! One day we realized in our live environment that even content authors can access the Scripts item in context menu and they have complete access to SXA scripts  like Remove Tenant, Remove Site, Add Site Language etc.  We realized this could create potential problems on live environments. Just imagine a scenario about an unaware content author who encounters these options and decides casually to check that what can Remove Tenant script do. Scary, right! So I started working on finding a way to h

What are resource files in Sitecore 10.1?

Do you know that version 10.1 onwards, Sitecore is storing default items as resource files. This is an interesting update as the files on disk are binary-serialized item data using Google’s ProtoBuf specification – in this case using the ProtoBuf.Net library for .Net. Why to store item as resource files? Sitecore has lots of  out-of-box items like sitecore/content/Home which are present in Sitecore databases. Sitecore has changed this approach to store these items on file system as resource files as ProtoBuf data to solve the complexity related to upgrading the Sitecore instances especially in containerized environments. If you have an instance of Sitecore 10.1 or above running, you will find these below files. Default Sitecore items are part of these files now -  How do they help in upgrades? In containerized solution, code and config updates are wrapped in Docker Image. When the out of box Sitecore items are placed in resource files, they get updated as part of Docker Image itself. T

Limit on number of SXA Sites : Sitecore Site in IIS keeps restarting due to large number of SXA sites

Let me start this blog with a question - Is there a limit on number of sites Sitecore SXA can support on a single Sitecore instance? If you search an answer for this, you will see the below - Bear with me, the answer to this question is not a simple 'No' in current state of Sitecore and SXA module. We will discuss more on this in this post.  THE PROBLEM We have upgraded from Sitecore 8.1 to Sitecore 10.1 and migrated our vanilla Sitecore sites into SXA sites. We started migrating some important sites to SXA and then we planned to move rest of the sites to SXA. Things were fine until the number of SXA sites hosted on our Sitecore instance were small. As we moved our rest of the sites to our new Sitecore instance, we started observing that the Sitecore site in IIS will continuously restart without giving much idea about why it is happening. THE SOLUTION We thought this can be a machine specific issue due to memory etc. and may be the issue wont reproduce on other developer machin

Old versions of Sitecore pages get updated in SXA Site

We have recently upgraded our Sitecore form Sitecore 8.2 to Sitecore 10.1 and have migrated vanilla Sitecore sites to SXA sites. So far so good! Then what's the problem? THE PROBLEM One random day, a content author (lets name him GhanSingh) opened a page in Experience Editor, edited it and then saved it. May be he didn't like his changes and he thought of checking older versions of the page. He went to the page in the Content Editor and tried to check old versions of the page and to his surprise he saw something like this -  Do you notice how older versions of the page also show same Statistics data (last modified date, last modified by etc.) as the most recent version. In fact, the content author thought his actions has created multiple versions of the page and he has no way of reverting back to older versions as he don't see them anymore in the drop down. Any guesses what caused it? THE SOLUTION We thought it may be some custom event handler that gets triggered on item:sa

Related Items not published in Sitecore Publishing Service

Sitecore Publishing Service  (SPS) is an opt-in mechanism for high-performance publishing in large scale Sitecore setups. This module increases publishing throughput, reduces the amount of time spent publishing large volumes of items, and offers greater data consistency and reliability. The module also improves the user experience and provides better visual feedback to the user on the state of the publishing system. If you don't use SPS yet and if your publishing tasks take longer than expected, SPS module can be highly useful to you. In this blog, I am going to share a recent experience related to configuring SPS in scaled environment. There is a specific step in installation guide which needs to be performed explicitly in scaled environments and if you miss it, you may have problems publishing related items with the page. THE PROBLEM In our case, publishing worked correctly but none of the related items of published page got published. We reached out to community on slack and als