Skip to main content

Posts

Default website is resolved instead of SXA site intermittently in Sitecore

 The Problem Recently, we encountered a weird problem where one of our sites in Experience Editor will resolve to default website and not to the correct site. This happened when an author or developer opened Content Editor and tried to select one of the pages in the SXA site and then clicked on Experience Editor in Publish tab to open the page in Experience Editor, the page opened with the following errors -  On checking the logs, we found that logs contains following entries for each SXA site -  We never saw these kind of errors earlier in our logs.  The Solution We started validating what is wrong with our site definitions. To our surprise, everything configured in site definitions appeared normal except the fact that a recent change was introduced to enable Enforce version presence. We soon found out a KB from Sitecore talking about the same problem - https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1002873 According to it -  An SXA site might not be resolved

Sitecore Search for Marketing

In this blog post, I have shared information about Sitecore Search. Most of the content in this post are my notes from a webinar presented by development team of Sitecore Search that I felt I should share with you :) What is Sitecore Search? Sitecore Search is an API first product designed by Sitecore to build search experiences from scratch without the need of complex code. The APIs can be integrated in any solution and the look and feel can be configured to match the application. Sitecore SPEAK also provides some UI elements that can be integrated with these APIs to build the search experience. Sitecore Search can be a great offering while re-platforming an application. In this post, we will learn more about capabilities of Sitecore Search. How Sitecore Search can help your organization? Sitecore search is great for marketers. It empowers them to configure searchable experiences without need of technology personnel. It enhances content discovery which generates more leads. Hence, it

Sitecore Media Cache : How to find media file in it?

In Sitecore Media Cache, the images are stored in MediaCache folder using a specific convention. This means if you need to locate an image in MediaCache folder, you need to understand this convention else you have to be really lucky to be able to find your image in MediaCache. I have many times figured this out earlier and then have also forgotten it when it was not needed. Recently, while working on a production issue, I again had to recall it  to know if a media file is being served from MediaCache or not. So this time I decided to document it and share it with other developers in case they too struggle with it. If you go to App_Data/MediaCache on your Sitecore instance, this is how a typical site folder in it looks like. All the media files for sites are cached in their site specific folders only -  If you go one level inside these folders, you will see this -  The above snapshot is from an example site which has few media items only. Your actual MediaCache folder may have hundreds

My Samsung Galaxy phone not charging and how I fixed it

I have been using Samsung Galaxy F62 for 2 years now without any problem until recently when I would plug the charger in to my phone, it would show all the signs of phone getting charged and after 20-30 seconds it just stops charging. The phone automatically stops showing any signs of charging. This happened once earlier as well but at that time, it worked fine on its own  after few reattempts. I assumed that it was a minor glitch and the problem is solved but that was not the end of it. Soon, the problem resumed and I started trying all the different mechanisms suggested on internet to fix this problem. I tried - using different charging adapters in case the charger was faulty using different charging cables in case the cable was broken  tried cleaning my charging port in case the port had some dirt running charging diagnostics/troubleshooting in my phone which detected nothing Finally, my phone battery drained completely and I had no other option than to visit a near by mobile techni

SOLID Principles in Software Development

  The SOLID principle was introduced by Robert C. Martin, also known as Uncle Bob and it is a coding standard in programming. This principle is an acronym of the five principles which is given below- Single Responsibility Principle (SRP) Open/Closed Principle Liskov’s Substitution Principle (LSP) Interface Segregation Principle (ISP) Dependency Inversion Principle (DIP) Single Responsibility Principle:  A class should have only one reason to change This  means every class should have a single responsibility or purpose. The class shall be updated only when a the behavior for this single responsibility changes. For E.g. If a class is responsible for login logic, then that is all it should do. Any other similar functionalities like Registration or Change Password should be implemented separately. As such, only when a change is required in Login logic will cause the class to be updated. If we keep updating a class for adding features which are not related to a single purpose, it makes the

Solr Search for Sitecore - Notes --Draft

SOLR SEARCH QUICK NOTES http://www.solrtutorial.com/solr-query-syntax.html BASIC CONCEPTS Solr prepares indexes. Indexes contains documents and documents contains fields. Documents can be assumed as rows in a table and fields as columns in tables. Before adding documents to index, we need to specify the schema. (not advisable to change schema after documents have been added).  The schema declares - what kinds of fields there are which field should be used as primary key which fields are required how to index and search each field When we search for a word, the word undergoes transformation to get converted to a token. SOLR then looks for these tokens in its indexes. Each token contains references to pages where it was found when SOLR was crawling and this is how search results are returned. All fields are not searchable. Many of them are maintained in indexes so that when a match is found, the field values may need to be displayed in the search results. This is done by following settin

Script to renew self-singed certificates in Sitecore

This one is an article to spread awareness about script solutions available in community but not popular.  As my self-signed certificates for Sitecore 10.0 instance expired, I want to use SIF or CLI to renew them and best also to replace thumbprints to minimize manual work. Is this possible with SIF or CLI? Or is there any ps1 script I could use. We have a LOT of test environments. As the certs have been expiring, I was complaining about the manual process I was using to change/update these. My clever co-worker Karl bowled up a powershell script that has been such a help!  This will generate a new CA cert for you to base all your self-signed certs on, or it will use one you already have. Put the pfx file in the same directory as the script. It displays all the sites in IIS and you pick the one to update - say a Sitecore 9 xconnect site, changes out the cert in the bindings, updates the thumbnails where needed in config. So easy once you've used it a couple of times. Enjoy. https://