My new blog present here.

Featured Post

Insights into Sitecore Search: A Definitive Introduction

A key component of digital experience management is effective information retrieval. A simplified approach is required for websites, applications, and platforms containing a lot of material so that consumers can easily get the data they require. This need is met by Sitecore, a well-known name in the field of digital experience platforms (DXPs), which provides powerful and comprehensive search functionality. We will travel into the realm of Sitecore Search in this article, learning about its capabilities, architecture , and the enormous value it offers both developers and end users. Introduction to Sitecore Search    A headless content discovery platform powered by AI , Sitecore Search enables you to build predictive and custom search experiences across various content sources. To extract and index you

Sitecore Error Troubleshooting: Experience Editor and Preview mode Error- Rendering view QuickbarButton.cshtml

Error Details: [InvalidOperationException]: Error while rendering view: '/sitecore/shell/client/Sitecore/Speak/Ribbon/Controls/QuickbarButton/QuickbarButton.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').

The one of the feature of Sitecore is to support multisite using single instance of Sitecore and for this we can utilize the Sitecore patch file to setup the new site:

      <site name="BrandA"
    rootPath="/sitecore/content/Tenant/BrandA"
    startItem="/Home"
    hostName=www.BrandA.com />
      <site name="BrandB"
          rootPath="/sitecore/content/Tenant/BrandB"
          startItem="/Home"
        hostName="www.BrandB.com"/>

Recently I was working on a Sitecore 9.1 project where we need to convert single site implementation into multiple managed websites, so I requested one of the team member to perform this task.
After setting up the BrandB website, we started getting error in Sitecore Experience Editor and Preview mode while accessing the page from BrandB:- Ribbon was not loading and Sitecore loading screen was in active mode only:

BrandB Site Patch file:


Error Analysis: To verify this issue,

1. I checked the log file:

And found [InvalidOperationException]: Error while rendering view: &#39;/sitecore/shell/client/Sitecore/Speak/Ribbon/Controls/QuickbarButton/QuickbarButton.cshtml&#39; .

2. BrandA site was working fine.

3. Removed the Site patch file and SiteB started working fine, in this case it was taking the default website setting. <site name=”website”….> is the default setting that comes with Sitecore.

Cause of Error:
Again, I investigated the BrandB patch file and found that Preview.DefaultSite setting was pointing to BrandA and due to this Ribbon was not loading in Experience Editor and Preview mode.

In multisite configuration, the value of Rendering.SiteResolving value set as “true” at /App_Config/Sitecore.config which helps in site resolving, so cross-site links can be rendered with correct hostname, language, and virtual folder.

In my case, the Experience Editor and Preview mode are being opened in the context of the site defined in the Preview.DefaultSite setting i.e. SiteA, due to this unexpected error “Server Error in '/' Application.” was coming in the place of Ribbon.

Solution:
To resolve this issue, I changed the Site name to SiteB in Preview.DefaultSite setting and now site context site resolved successfully and started loading the Ribbon correctly in Experience Editor and Preview mode.

Useful articles:


Comments

Popular posts from this blog

Sitecore GraphQL Queries

Twenty 20 Masti:

Sitecore Experience Edge GraphQL Queries