Skip to main content

Posts

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!

How to restore bacpac file in SQL server for Sitecore?

Do you know how to restore a bacpac file in SQL Server? You may wonder why you ever need to do it. Well, if you are working in Sitecore, then there are high chances at some point of time in your career, you may be asked to take backup of Sitecore databases in a higher environment and then restore them in lower environment. Recently, a friend  of mine was trying to do the same. He was trying to use restore database option as in snapshot below but it did not work out as expected -  It turned out that Restore Database method is used for restoring .bak files but the backup files he had were bacpac files which have a slightly different restore process. So, I thought other fellow sitecorians may also face similar issue. Why not share it with the community as well.  Bacpac vs Bak file Lets first understand what is the difference between bacpac and bak file. Why there are 2 different types if we are trying to achieve the same goal to restore database? Bacpac is a dacpac file but with data incl

Sitecore item not publishing due to a field in Lifetime section

A perplexing issue once stumped a content author trying to publish an item. No matter what she tried—unchecked "Never Publish," correct language settings, valid publish dates, approved workflow states—the page just wouldn't go live. Even after clearing browser and CDN caches, the item remained elusive in the web database. I started looking at the item hoping that content author may have missed something but everything looked normal. I also jumped into publishing logs and each time it said that the item published successfully. I opened Sitecore with web db selected and on navigating in the content tree, I did not see the item. This was confusing but interesting. There is probably something which I have not touched before and it impacts an item's publishing. Upon closer inspection, a rarely used field, "Hide Version in Lifetime," held the key. This obscure setting, tucked away in the depths of the item's properties, was silently thwarting all publishing at

Script to find number of SOLR queries from Sitecore site

 The Issue In order to enhance performance, we were tasked with determining the number of search queries sent by our Sitecore CD server (live site) to the SOLR server. The Resolution Our initial approach was to examine the Search.log files located in the App_Data/logs folder within the Sitecore instance. However, these files also include search queries initiated from the Sitecore CM server. For instance, a content author may search for an item based on its name or ID using the search box in the content editor. Therefore, we needed a method to filter out queries that are only generated from the actual site and not by the Sitecore client. We devised a solution based on the observation that any query from the live site always involves a search in one of the computed fields. In our case, this computed field is named __rendered_content_t and it typically contains all the content from the text fields on a page. We developed the following script with a simple idea in mind: 1. Locate all the S

Questions every business stakeholder needs to ask to Sitecore implementation partners

The Premise Sitecore is widely recognized as one of the most popular content management systems available in the market today. It has gained significant traction with numerous projects being implemented across the globe. In order to maintain its position as a leading software provider, Sitecore consistently updates its software to offer the best capabilities to its customers. Each year, new products are introduced, generating a great deal of excitement within the developer community.  As a result, Sitecore implementation partners invest time and effort in exploring these new products and enhancements to develop their expertise. This enables them to provide valuable recommendations to customers regarding upgrades, integrations, and customizations that can benefit their businesses. However, customers may wonder how they can ensure that they truly derive business value from all of these offerings. Naturally, before any implementation takes place, extensive discussions occur between busine