Pages

07 October, 2021

Sitecore 9, 10 - Experience Editor Slow or Hang in general or for non-English languages?

As part of the Sitecore Upgrade to Sitecore 10.0.1, we faced an issue related to experience editor. When we try to edit the page in experience editor for non-english version of the item, the CM website hangs and then it will just block every other requests. Entire CM instance will be unavailable. 

Troubleshooting:

  1. Checked the Vanilla Sitecore 10.0.1 version and experience editor is working as expected. 
  2. Debugged the solution and found out that Dictionary API (Sitecore.Globalization.Translate.Text) is the root cause for the slowness. 
Solution:
Sitecore has reported a similar issue as a known issue for Sitecore 9.3 onwards and the fix was included in Sitecore 10.1.0. Sitecore article has a fix for version 9.3 in their page

Reached out to Sitecore to get the fix for Sitecore 10.0.1 version. For this version, the hotfix has a set of DLLs and a config file. They are not support DLLs. So we should include this as part of the CI/CD pipeline so that it does not get overwritten next time. 

After applying the fix, the experience editor started to respond for all the other languages as well. 

Reach out to Sitecore if your Sitecore version (9.3 to 10.0.1) has a similar issue on experience editor and they will be providing the hotfix for the particular version. 

17 September, 2021

Sitecore PowerShell - Create a report with all referenced items by Lookup Items

In case if you have a list of lookup items and you would like to get a Sitecore PowerShell report of all the referenced items in Sitecore, you can make use of the below script. Also this script demonstrates the usage of PSObject by which you can create custom object and render it in the output window. This approach is using Link database and rebuilding the link database helps you to get the most accurate results. 

With PSObject, you can merge two different object and create a new custom object which can be used for rendering the results. Instead of using multi-dimensional arrays, this can be a better approach. 




02 September, 2021

Sitecore Upgrade - Codebase Upgrade - Migrate from packages.config to PackageReference

We have been always using packages.config file to manage the nuget package references. Instead of config file, PackageReference has been introduced to provide benefits for the developers. 

Benefits:

  1. Instead of showing all the dependencies in the packages.config file, only top level dependencies will be added as part of PackageReference. This gives a clean and simple view on the references. 
  2. Ability to manage all the project level configuration like package references in a single csproj file itself.
  3. Adding and removing packages are faster compared to Packages.config file. 
Migration of Packages.config to PackageReferences
To migration all the existing references, right-click the References node in Solution Explorer, and select the Migrate packages.config to PackageReference command.


Default to PackageReferences:
In order to add packages to PackageReferences by default, open Tools > NuGet Package Manager > Package Manager Settings menu, change the Default package management format to PackageReference.



blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }