Sitecore xConnect error GetEntityOperation

This error message caught my eye on xConnect in Sitecore 9.3, which looked like this.

"[Error] Sitecore.XConnect.Operations.GetEntityOperation`1[Sitecore.XConnect.DeviceProfile]: Sitecore.Xdb.Collection.Failures.DataProviderException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception: The system cannot find the file specified"

This issue was because of Xdb had wrong ServerName in the [*.Collection.ShardMapManager] database.


The database and table “[*.Collection.ShardMapManager].[__ShardManagement].[ShardsGlobal]” that contains [ServerName] and [DatabaseName] columns. Replace with your ServerName and hopefully this will be the issue in your case.

Hope this helps if you get a similar error.

Sitecore Solr Sort Alphabetically

Just a short and quick blogpost. I got an issue with my alphabetically sort.
This was because my field was tokenized and of type text in Solr. So I had to make the field Untokenized and returnType string. Fixed!

With Sitecore you can pretty easy sort by Ascending or Descending with LINQ to Sitecore
Just write an OrderBy or OrderByDescending with your field like so:

switch (direction)
{
  case SearchOrderDirection.Ascending:
    return queryable.OrderBy(i => i.Title);
  case SearchOrderDirection.Descending:
  default:
    return queryable.OrderByDescending(i => i.Title);
}

REMINDER: The field should be UNTOKENIZED and returnType string.

Sitecore 10.2 Feature summary

Sitecore released the new version, 10.2 recently and I wanted to make a quick summary of some of the features that stood out to me.
For full Release Notes please check Sitecores doc here: 10.2 Release Notes

Decrepcated

  • Update Center is going away.
  • Support for Azure Search has been removed. They are going back to Solr after moving over to Azure Search in Version 10.0. Solr has been there through all 10.x but now their fully relying their internal indexes on Solr.

New features

  • EXM DDS role now supports containers. For fast deployment of a Dedicated Dispatch Server.
  • Solr version 8.8.2 is now the recommended version.
  • MVC components are now supported in Experience Edge. This is so projects can gradually go towards Headless and not have to throw away their existing projects.
  • Sitecore Identity Server 6.0.0 now runs on .Net Core 3.1. A big security update.
  • Use xConnect CLI to purge interactions you don’t need. Clear up space.
  • There is a new “Content Explorer” in Horizon which is a search and filter based way of finding items in Sitecore. This looks promising for future Headless endeavours.
  • Horizon now fully integrated with SXA.
    SXA now has Bootstrap 5 support, upgrades to Scriban templates and lots more.