Tuesday, February 25, 2020

Solr Proxy Console: Another Tool for Your Sitecore Tool Belt

Have you ever been faced with a challenge when Sitecore search doesn’t work on your server? If the answer to this is yes then you’re in the right place… the tool I’m exploring below will be sure to make your development life easier!

Let’s imagine that something related to Solr search doesn’t work on your server... To find out what is wrong, you would need to use Solr console, your next steps would then be:


  1. Connect to remote desktop on the server, where Sitecore site is hosted
  2. Find ContentSearch.Solr.ServiceBaseAddress Sitecore settings value
  3. Open a browser on a remote desktop session and navigate to Solr URL


This process has some inconveniences: 

There is a possibility that you will not have access to the remote server, depending on your company or client policy
If it is your internal company test server, where are hosted many sites, you and your colleagues will “fight” for sessions that are allowed on the server, kicking off each other
Working on a remote desktop has some lag which means it's not as convenient as using your local machine

Last year I probably opened Solr console through a remote server more than 100 times; that’s why I decided to improve this process! Sitecore websites can play the role of the proxy server and transfer requests to real Solr admin panel. So, I have created a Sitecore module.

Here’s how to use it:


  1. Download Sitecore update package from AppVeyor
  2. Install update package using update installation wizard /sitecore/admin/UpdateInstallationWizard.aspx
  3. Open URL of Solr proxy https://yourwebsite/solr

Optional steps, if you want to use HTTP handler instead of injecting into HttpRequestBegin pipeline:


  1. Open Web.config file and add handler configuration>system.webServer>handlers:
    <add verb="*" path="solr/*" type="Foundation.SorlProxy.SolrHandler, Foundation.SorlProxy" name ="SolrHandler" />
  2. Add "/solr" to IgnoreUrlPrefixes Sitecore setting (Sitecore.config Sitecore>Settings>Setting[name="IgnoreUrlPrefixes"])
  3. Disable Foundation.Solr.Proxy.config configuration file

If you want to know more about how this module works or have any issues, look on GitHub repository, where all sources are located.

Saturday, February 22, 2020

Sitecore and Google Lighthouse Integration

Google Lighthouse became almost industry standard tool for measuring performance, accessibility, progressive web apps and SEO. There are few reasons, why it had happened. First of all, it is integrated with most popular browser: Google Chrome. Everyone is able to press F12(open DevTools) click “Generate report” button and get results. You should not be an expert, Lighthouse will tell you if your images are not optimized, if your scripts running too long, if you have wrong page structure that have bad influence on SEO. Second reason of Lighthouse popularity is that Google is number one web search engine. And as it is major source of traffic for many websites, it has sense to optimize your pages based on Google recommendations, which are can easily get from Lighthouse.

Pages performance, accessibility and SEO are very important for any website built on Sitecore. That is why I decided to integrate Lighthouse with Sitecore. It will allow you to run and access reports directly from Sitecore interface, have historical information and historical charts. As for me, it could be good checker for your day to day work with Sitecore. You are doing some improvement, you can easily understand how this improvement influence on particular pages and whole website. Or you are doing some change that influences on many pages, you can easily find out if it doesn’t break anything related to performance or accessibility.

I am glad to introduce: Sitecore.Lighthouse. Sitecore module that provides ability you to get everything from Lighthouse directly from Sitecore interface. On 22 February of 2020 it was tested only on Habitat Home and other few sites. That is why any contribution or bug reports are welcome.