Thursday, June 13, 2019

Sitecore SXA Web Accessibility Testing: Fix for Sitecore SXA Gallery Video component



Sitecore Experience Accelerator (SXA) Web Accessibility Testing: Fix for Sitecore SXA Gallery Video component

The Web Accessibility of a website is very important NFR and needs to be taken care before going LIVE and best approach is to take care this activity during the development phase, it means developer (HTML mockup and Backend Developer) should include this activity during the development.

There are some web content accessibility guidelines (WCAG) needs to be taken care:
WCAG 1.0
WCAG 2.0

Web accessibility guidelines will help in creating the website so that public content of the website accessible to all types of people including people with disabilities via correctly designed, developed and edited website.

In order to make Web Content Accessibility Guidelines (WCAG) compliant website we have to do the Web accessibility testing of website. We can select the web accessibility testing tool as per client need from the available list at Web Accessibility Evaluation Tools List.

 You can also use the Google Chrome browser add-on WAVE Evaluation Tool.

After installation of above add-on restart the Google Chrome browser and access the required web-site and click on the WAVE Evaluation Tool icon beside browser or right click on the page and select WAVE this page


In the above screen show, the output of Web accessibility test using the WAVE Evaluation Tool are displaying, which depict: Errors, Alerts, etc….

I have used WAVE Evaluation Tool in the Sitecore XP 9.0 (9.0 rev. 180604 Update-2, SXA 1.7 rev. 180604) Experience Accelerator (SXA) website and some of the error details are:

If you click on the Contrast Option, then it will show you the Contrast related errors:

If you click on the Styles Option, then it will show you the Styling related errors:


With the help of above findings, we can resolve Web accessibility related errors and make site Web Content Accessibility Guidelines (WCAG) compliance.

While doing the Web accessibility testing I found Web accessibility bug in the Sitecore SXA Gallery Video component.

Issue Details: Thumbnail Image for SXA Gallery Video does not contain "alt" attribute in the generated HTML markup.

* In Gallery Component > Gallery Video item added
* In Gallery Video item added the image for "Custom local thumbnail" attribute which having the ALT text also.
But after rendering of image, its not showing the ALT Text for image:

<img width="1000" height="40" style="left: 0px; top: 0px; width: 1000px; height: 40px; display: block; position: absolute; min-height: 0px; max-height: none; min-width: 0px; max-width: none; opacity: 1; transform: translate3d(0px, 0px, 0px);" src="/-/media/Project/Site1/shared/Img1.png">

Fix: The alternate text not showing for the Gallery Video item image is a BUG and for that Sitecore support team provided the fix

1. Backup the /sitecore/media library/Base Themes/Core Libraries/Galleria/galleria-classic-min media attachment;
2. Download the attached galleria-classic-min-fixed.js file:


3. Attach it to the /sitecore/media library/Base Themes/Core Libraries/Galleria/galleria-classic-min item;
On the related Video item, please fill the "Description" field. It will be used for the "alt" attribute of the related Custom Thumbnail image:

Output after applying the fix:

Sitecore Stack Exchange query: Sitecore SXA Gallery Video item Thumbnail Image

Thanks to Peter Prochazka a.k.a chorpo (@Chorpo) for SXA Logo 

Issue Listing:
  • what is web accessibility initiative
  • how to use web accessibility toolbar
  • what is web accessibility and why is it important
  • what are web accessibility guidelines
  • what is web accessibility and usability
  • what is web content accessibility guidelines (wcag) 2.0
  • who benefits from web accessibility
  • what is web accessibility testing
  • web accessibility in html5
Reference:

Share:

Sitecore Error Troubleshooting: Sitecore Solr Connectivity Issue:: Part-3


Sitecore 9.1 and Solr Connection issue in Sitecore Azure PaaS XP Scaled Topology or Sitecore on-premise XP Distributed Topology

In my previous articles related to Sitecore Solr connectivity issue, I already explained about:
Part-1: Sitecore Solr connectivity issue details with ways to check the connectivity
Part-2: How to resolve Sitecore Solr connectivity in Sitecore XP Single Topology

In this blog post, we will learn how to validate the Solr configuration in Sitecore Azure PaaS XP Scaled Topology or Sitecore on-premise XP Distributed environment

Architecture Details:

Sitecore XP Scaled environment created.
Solr master url with 02 slaves being used.
The Solr master url is https://12.832.11.201:8983/solr
The Solr load balancer url is https://11.832.11.201
Solr slave’s behind the Load Balancer, so CD will use the Load Balancer url.

Proposed Solution:
I would like to thank DAVID RUCKMAN (@druckman), for sharing knowledge on “Switch Sitecore 9 From Azure Search to Solr -- Step-By-Step Instructions”, this article helps in identifying the Sitecore Solr connectivity issue.

By following “Switch Sitecore 9 From Azure Search to Solr -- Step-By-Step Instructions”, I tried changing the configuration one-by-one and come up with set of configurations which needs to be changed to make connectivity between Sitecore XP Scaled and Solr.

Change the Sitecore configuration in CM or CM App Service:
1. Go to the [WebRoot]\Web.config:
  • Remove the <add key="search:define" value="<Azure or Lucene>" /> and add <add key="search:define" value="Solr" /> 
2. Open [WebRoot]\App_Config\Sitecore\ContentSearch\Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config:
  • REMOVE or COMMENT below entries:
    • <setting name="ContentSearch.Solr.ServiceBaseAddress" value="https://<URL TO YOUR SOLR INSTANCE>:<PORT NUMBER>/solr" />
    • <setting name="ContentSearch.SearchMaxResults" value="500" />
3. Go to [WebRoot]\App_Config\ConnectionStrings.config:
        I. Search for "solr.search" and update the Solr url with Master Solr Url: -
               <add name="solr.search" connectionString="< URL TO YOUR SOLR MASTER  INSTANCE>:<PORT NUMBER>/solr" />
       II. Search for "cloud.search",  it SHOULD BE EMPTY or COMMENTED :
<add name="cloud.search" connectionString="" />
       III. Remove the  “<add name="collection.search" ... />”

Change the Sitecore configuration in xc-Collect Website/App Service:
1. Disable file [WebRoot]\App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml 
2. Enable file [WebRoot]\App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
3. Disable file [WebRoot]\App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml 4. Enable file [WebRoot]\App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
5. Disable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
6. Enable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
7. Enable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.WebClient.SOLR.xml
8. Disable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
9. Enable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
10. Update the file [WebRoot]\App_Config\ConnectionStrings.config : 
      I. Remove the  “<add name="collection.search" ... />”
      II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR MASTER INSTANCE>:<PORT NUMBER>/solr/xdb" />
11. Upddate the file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_config\ConnectionStrings.config: - 
       I. Remove the  “<add name="collection.search" ... />”
       II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR MASTER  INSTANCE>:<PORT NUMBER>/solr/xdb" />

Change the Sitecore configuration in xc-Ref Data web site/App Service:
1. Disable file [WebRoot]\ App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
2. Enable file [WebRoot]\ App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
3. Disable file [WebRoot]\ App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
4. Enable file [WebRoot]\ App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
5. Disable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
6. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
7. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.WebClient.SOLR.xml
8. Disable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
9. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
10. Update the file [WebRoot]\App_Config\ConnectionStrings.config :
      I. Remove the  “<add name="collection.search" ... />”
      II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR MASTER INSTANCE>:<PORT NUMBER>/solr/xdb" />
11. Upddate the file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_config\ConnectionStrings.config: -
       I. Remove the  “<add name="collection.search" ... />”
       II. Add <add name="solrCore" connectionString="< URL TO YOUR MASTER SOLR INSTANCE>:<PORT NUMBER>/solr/xdb" />


Change the Sitecore configuration in xc-Search web site/App Service:
1. Disable file [WebRoot]\ App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
2. Enable file [WebRoot]\ App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
3. Disable file [WebRoot]\ App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
4. Enable file [WebRoot]\ App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
5. Disable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
6. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
7. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.WebClient.SOLR.xml
8. Disable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
9. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
10. Update the file [WebRoot]\App_Config\ConnectionStrings.config :
      I. Remove the  “<add name="collection.search" ... />”
      II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR MASTER INSTANCE>:<PORT NUMBER>/solr/xdb" />
11. Upddate the file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_config\ConnectionStrings.config: -
       I. Remove the  “<add name="collection.search" ... />”
       II. Add <add name="solrCore" connectionString="< URL TO YOUR MASTER SOLR INSTANCE>:<PORT NUMBER>/solr/xdb" />


Change the Sitecore configuration in CD Website/App Service:
1. Go to the [WebRoot]\Web.config:

Remove the <add key="search:define" value="<Azure or Lucene>" /> and add <add key="search:define" value="Solr" />
2. Open [WebRoot]\App_Config\Sitecore\ContentSearch\Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config:

REMOVE or COMMENT below entries:
<setting name="ContentSearch.Solr.ServiceBaseAddress" value="https://<URL TO YOUR SOLR MASTER INSTANCE>:<PORT NUMBER>/solr" />
<setting name="ContentSearch.SearchMaxResults" value="500" />
3. Go to [WebRoot]\App_Config\ConnectionStrings.config:
        I. Search for "solr.search" and update the Solr url with Solr Slave Url with Port Number or Solr Load Balancer Url without Port Number: -
               <add name="solr.search" connectionString="< URL TO YOUR SOLR SLAVE INSTANCE>:<PORT NUMBER>/solr" />
       II. Search for "cloud.search",  it SHOULD BE EMPTY or COMMENTED :
       <add name="cloud.search" connectionString="" />
       III. Remove the  “<add name="collection.search" ... />”



After performing configuration changes:
Restart the Sitecore instances or Sitecore Azure App Services.
Login into Sitecore instance and access the Sitecore Launch Pad >  Control Panel > Indexing > Indexing Manager and verify that Solr indexes are loading or not.
If Solr indexes are loading then re-build all the indexes and check count of documents (numDocs) in each Sitecore Solr core at Solr instance.

Note:- 
1.Please update file name .disabled at the end to disable the files
2.remove .disabled from the file name to enable the file

Issue Listing:
Sitecore 9.1 (IaaS and Azure PaaS) + Solr (IaaS) Connectivity
Sitecore Solr Connections
Sitecore Solr Index Configurations
Setting up Solr with Sitecore
Configure Sitecore to work with Solr
Provisioning Sitecore environment using Solr connection
Sitecore.contentsearch.solr.indexes.config
Switch Search Provider in Sitecore

 Sitecore Solr connectivity issue:
• Part-1 : Sitecore Solr connectivity issue details with ways to check the connectivity
Part-2 : How to resolve Sitecore Solr connectivity in Sitecore XP Single Topology


Share:

Monday, April 08, 2019

Sitecore Error Troubleshooting: Sitecore Solr Connectivity Issue:: Part-2


Sitecore 9.1 and Solr Connection issue in Sitecore Azure PaaS XP Single Topology or Sitecore on-premise XP Single

 Sitecore Solr connectivity issue:
• Part-1 : Sitecore Solr connectivity issue details with ways to check the connectivity
Part-2 : How to resolve Sitecore Solr connectivity in Sitecore XP Single Topology
Part-3 : How to resolve Sitecore Solr connectivity in Sitecore XP Scaled/Distributed Topology

The Sitecore Experience Platform providing the capability to select search provider as Solr, Lucene or Azure Search:
For on-premise, Solr configured as Default search engine provider for content search and xConnect search.
For Sitecore Azure PaaS instance, Microsoft Azure search configured as Default search engine. You can change search service provider from default Microsoft Azure search to Solr.

In this blog post, we will learn how to validate the Solr configuration in Sitecore Azure PaaS XP Single Topology or Sitecore on-premise XP Single environment

Problem Statement:
After setting up the new Sitecore 9 environment (IaaS or PaaS or On-Prem), Sitecore not able to connect with the Solr:
Sitecore Solr Indexes were not loading.
Sitecore Cores not created in the Solr instance while creating the new Sitecore 9 environment.

Above issue details mentioned in my previous blog post Sitecore Error Troubleshooting: Sitecore Solr Connectivity Issue:: Part-1

The Solr url https://12.832.11.201:8983/solr accessible via browser and its using Self-Signed certificates. In PROD instance, it will be using the valid certificates and for Sitecore PaaS instance’s in CM and CD app service needs Solr certificate Thumbprint needs to be installed to establish the handshake from any client for authorization. From Azure we can install the pfx certificate and thumbprint to establish the connection between Sitecore to SOLR.

Proposed Solution:
I would like to thank DAVID RUCKMAN (@druckman), for sharing knowledge on “Switch Sitecore 9 From Azure Search to Solr -- Step-By-Step Instructions”, this article helps in identifying the Sitecore Solr connectivity issue.

By following “Switch Sitecore 9 From Azure Search to Solr -- Step-By-Step Instructions”, I tried changing the configuration one-by-one and come up with set of configurations which needs to be changed to make connectivity between Sitecore and Solr.

Change the Sitecore configuration in CM or CM App Service:
1. Go to the [WebRoot]\Web.config:
  • Remove the <add key="search:define" value="<Azure or Lucene>" /> and add <add key="search:define" value="Solr" /> 
2. Open [WebRoot]\App_Config\Sitecore\ContentSearch\Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config:
  • REMOVE or COMMENT below entries:
    • <setting name="ContentSearch.Solr.ServiceBaseAddress" value="https://<URL TO YOUR SOLR INSTANCE>:<PORT NUMBER>/solr" />
    • <setting name="ContentSearch.SearchMaxResults" value="500" />
3. Go to [WebRoot]\App_Config\ConnectionStrings.config:
        I. Search for "solr.search" and update the Solr url with Master Solr Url: -
               <add name="solr.search" connectionString="< URL TO YOUR SOLR INSTANCE>:<PORT NUMBER>/solr" />
       II. Search for "cloud.search",  it SHOULD BE EMPTY or COMMENTED :
<add name="cloud.search" connectionString="" />
       III. Remove the  “<add name="collection.search" ... />”

Change the Sitecore configuration in xConnect or xConnect App Service:
1. Disable file [WebRoot]\App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml 
2. Enable file [WebRoot]\App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
3. Disable file [WebRoot]\App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml 4. Enable file [WebRoot]\App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
5. Disable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
6. Enable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
7. Enable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.WebClient.SOLR.xml
8. Disable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
9. Enable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
10. Update the file [WebRoot]\App_Config\ConnectionStrings.config : 
      I. Remove the  “<add name="collection.search" ... />”
      II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR INSTANCE>:<PORT NUMBER>/solr/xdb" />
11. Upddate the file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_config\ConnectionStrings.config: - 
       I. Remove the  “<add name="collection.search" ... />”
       II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR INSTANCE>:<PORT NUMBER>/solr/xdb" />

After performing configuration changes:
Restart the Sitecore instances or Sitecore Azure App Services.
Login into Sitecore instance and access the itecore Launch Pad >  Control Panel > Indexing > Indexing Manager and verify that Solr indexes are loading or not.
If Solr indexes are loading then re-build all the indexes and check count of documents (numDocs) in each Sitecore Solr core at Solr instance.

Note:- 
1.Please update file name .disabled at the end to disable the files
2.remove .disabled from the file name to enable the file

Issue Listing:
Sitecore 9.1 (IaaS and Azure PaaS) + Solr (IaaS) Connectivity
Sitecore Solr Connections
Sitecore Solr Configurations
Setting up Solr with Sitecore
Configure Sitecore to work with Solr
Provisioning Sitecore environment using Solr connection
Sitecore Solr Index Issues
Switch Search Provider in Sitecore

Share:

Wednesday, April 03, 2019

What is Page Design in Sitecore Experience Accelerator (SXA)?

What is Page Design in SXA?
The Page Design in Sitecore Experience Accelerator (SXA) serve as a Page Layout for the Content Item which needs to be displayed as a Page. It means, SXA Page Design will provide the functionality or capability to design page with the help of:
In my earlier article, I have explained about Sitecore Experience Accelerator (SXA) Partial Design. This article will help to understand how to use SXA Partial Design.

The Sitecore Experience Accelerator (SXA) emphasize on the re-usability and SXA Page Design serve the same purpose. It means, page design (or page structure) created for page like Product Details, Article, Blog, etc., one time and can be utilize for subsequent items. It’s like assignment of Presentation details in Template’s _Standard Values in Sitecore . With this Content Author task only to create the item from particular template and add the content, and no need to design page every time.


In the above diagram, I am trying to explain that:

Sitecore Experience Accelerator (SXA) Page Design is Super set which contains Sitecore Experience Accelerator (SXA) components/renderings and Sitecore SXA Partial Design.
The Sitecore Experience Accelerator (SXA) Partial Design is the sub-set of page/sxa page design. Its uses set of responsive and reusable renderings. These renderings can be added to 12 columns provided by Sitecore SXA Theme. The set of SXA Partial Designs help to create complete page.

Now, we will try to understand use of Sitecore Experience Accelerator (SXA) Partial Design and Sitecore Experience Accelerator (SXA) Page Design with the help of below mentioned Problem Statement.

Problem Statement:
For example, we have to design below mentioned page using the Sitecore Experience Accelerator (SXA)


Approach:
To design, above mentioned page using the Sitecore SXA then we must think:
How can we utilize Sitecore SXA OOTB components/renderings?
How many SXA partial design required?
How many SXA partial design can be re-used?
How SXA components/renderings, inside the partial design can be re-used or use snippet if different content required on different-2 pages using re-usable partial design?

By considering above steps the logical SXA partial design and page design are:

Sitecore Content Tree Implementation details:
The step-by-step details to create Page design documented in a very good way in Sitecore official documentation:

  Identified Partial Design Details:  
       Output after combining the Partial Design in order:


    After combining the SXA Partial Design in required order above mentioned Home Page Design
    can be created which contains the re-usable Partial Designs like Header, Footer, etc.

   It's mean, Page Design for templates like Product Details, Article, Blog, etc., can utilize the re-
   usable Partial Designs and Page Design created once can be utilized by rest of the items created
   with particular templates.

Assign Partial Designs to Page Design:
  1. For example, we have “Home Partial Design”. Now create new Page Design Folder and name
        it as “Home”:


   2. Now go to Partial Design section of Home Page Design and select the Header Partial, which we          created earlier: Move to R.H.S.:
   


  3. Now, we will apply Page Design to page, in our case its Home page.



  4. You can also assign Partial Design to Page Design by opening the page in experience editor:


  5. In the Step-4, we are explicitly assigning Page design to each page item and its very painful for Content Authors, to avoid that we can map Template with Page Design so that all items created from templates like Product Details, Article, Blog, etc., will have required page structure:

For this, please go the Content Tree > Site > Presentation > Page Design > Content Tab > Designing section:

 Order of Partial Designs in Page Design:
In the section “Assign Partial Designs to Page Design”, we learnt that how to assign existing SXA Partial Designs to Particular SXA Page Design. While adding/assigning SXA Partial Designs to SXA Page Design, we need to take care about the order of Partial Design, i.e.:

If 02 partial design contains renderings in header section, one having Navigation rendering and another having Carousel:
    And we will add above partials in following order:
    1. Carousel Partial Design
    2. Header Partial Design


  Output:
  
  


From the above details, its clear that, order of partial’s matter while structuring the Page Design. These things, we have to educate/explain to Content Author’s to avoid issues.

I hope that above details help you to understand the Sitecore Experience Accelerator (SXA) Page Design.

Happy Sitecore Coding!

Reference


Share:

Tuesday, March 19, 2019

Sitecore Error Troubleshooting: Sitecore Solr Connectivity Issue:: Part-1

Sitecore Error Troubleshooting: Sitecore Solr Connectivity Issue:: Part-1
How to verify Sitecore 9.1 (IaaS and Azure PaaS) + Solr (IaaS) Connectivity
In this article, I will explain how to check the connectivity between the Sitecore instance and Solr (IaaS) instance.

Problem Statement:
I was spinning up Sitecore 9.1 (Initial Release) Azure PaaS XP topology with Developer configuration and search provider was Solr (IaaS) and Solr instance already created in Azure box and url is https://12.832.11.201:8983/solr and its using Self-Signed certificates.

The Solr url https://12.832.11.201:8983/solr accessible via browser.



After completion of web app creation, I tried accessing the instance with url: https://ak-sitecore-91-123456-single.azurewebsites.net/ and logged into Sitecore Launch Pad >  Control Panel > Indexing > Indexing Manager:


Was not loading the Solr indexes.

Note: Same way we can verify above settings in Sitecore IaaS instance.

Steps to verify Sitecore and Solr connectivity:

Step-1: This steps can be used for both Sitecore Azure PaaS and IaaS Instance
When we are creating the Sitecore instance by providing the Solr url then sometimes, Sitecore related cores not be created. To verify that go to your Solr url and verify total 11 Sitecore cores present or not: 


 The 11 Sitecore Solr cores/collections are:

1 sitecore_core_index
2 sitecore_fxm_master_index
3 sitecore_fxm_web_index
4 sitecore_marketing_asset_index_master
5 sitecore_marketing_asset_index_web
6 sitecore_marketingdefinitions_master
7 sitecore_marketingdefinitions_web
8 sitecore_master_index
9 sitecore_suggested_test_index
10 sitecore_testing_index
11 sitecore_web_index

 If anyone of the Sitecore Solr core not present at Solr instance then create it: for example sitecore_master_index not present

  • Open the command prompt in Administrator mode.
  • Go to bin folder of Solr “c:\solr-6.6.2\bin”
  • Run the command “solr create -c sitecore_master_index”
  • After execution of command, go to c:\solr-6.6.2\server\solr\sitecore_master_index\conf folder and place the "managed-schema" file from your existing Solr core instance of sitecore_master_index (<Working Solr instance>\server\solr\sitecore_master_index\conf ). If you are not having running Solr instance then you can take managed-schema of Sitecore 9.0.2 instance from:
  • Repeat above steps for all missing Sitecore Solr cores.
  • Restart the Solr service
  • Restart the Sitecore instance or Sitecore Azure App Service
  • Login into Sitecore instance and access the itecore Launch Pad >  Control Panel > Indexing > Indexing Manager and verify that Solr indexes are loading or not.
  • If Solr indexes are loading then re-build all the indexes and check count of documents (numDocs) in each Sitecore Solr core at Solr instance.
  • If Solr indexes are not loading then proceed to next step.
This error usually occurred when you are trying to setup Sitecore XP Scaled topology.

Step-2: This step needs to be verified if Solr deployed into different box

In this step we will verify the Inbound and Outbound rule in Solr box: How to open ports to a virtual machine with the Azure portal.

Please check reference articles for this:
Step-3: This step needs to be verified if we are using Sitecore Azure PaaS Instance

In this step, we will verify that Sitecore Azure PaaS instance being able to contact Solr box or not.

  • Login into https://portal.azure.com > Go to Resource groups > Select Resource Group in which Sitecore Azure PaaS instance created.
  • Search the App Service ak-sitecore-91-123456-single.
  • Click on Advance Tools> Go > Debug Console > CMD:


                How to directly check the KUDO tool directly with App service url 
                 https://ak-sitecore-91- 123456-single.azurewebsites.net/:

                   >Add the -scm before the .azurewebsites.net like: 
                   https://ak-sitecore-91-123456-single- scm.azurewebsites.net/
  • Enter the tcpping and see it’s recognizing the command or not:

     Now access the Solr ip address with IP Address 12.832.11.201:8983 and see request coming or 
     not: like below
    D:\home>tcpping 12.832.11.201:8983 
Connected to 12.832.11.201:8983, time taken: 244ms 
Connected to 12.832.11.201:8983, time taken: 15ms 
Connected to 12.832.11.201:8983, time taken: 29ms 
Connected to 12.832.11.201:8983, time taken: 32ms 
Complete: 4/4 successful attempts (100%). Average success time: 80ms 

Step-4:
In the Step-3, we verified that connectivity happening from Sitecore box to Solr box. Now we will cross check that connection string for Solr clearly mentioned or not in the Sitecore instance.

Now go to site>wwwroot>App_Config>ConnectionStrings.config and look for solr.search, and check that its pointing to correct Solr instance:
  <add name="solr.search" connectionString="https://12.832.11.201:8983/solr" />

Note: Same way we can verify above settings in Sitecore IaaS instance. Change the url of Solr, if not correct.

Step-5: This steps can be used for both Sitecore Azure PaaS and IaaS Instance
By performing above mentioned steps, if still Solr indexes are not loading into Sitecore. Then we have to create the new core in the Solr with documents/records and try to access this Solr core using the Solr.NET via ASP.NET MVC application and will deploy into Azure Web App. It will help us to understand that Solr connectivity:

  • Available to different Resource Group and resources
  • Inbound and Outbound rules are working
  • Solr instance available
Now we will create the Solr core (or collection) and configure the solr schema :
  • Open the command prompt in Administrator mode.
  • Go to bin folder of Solr “c:\solr-6.6.2\bin”
  • Run the command “solr create -c samplecollection”
     

Now add sample document to newly created core:

  • In the command prompt (Administrator mode), go to folder "<Drive>:\<Solr Instance folder>\example\exampledocs. This folder will contains the sample documents which can be used in our newly created Solr core or collection. .
  • Run the below command:
          java -Djavax.net.ssl.keyStorePassword=secret -Djavax.net.ssl.keyStore=../../server/etc/solr-ssl.keystore.jks -Djavax.net.ssl.trustStore=../../server/etc/solr-ssl.keystore.jks -Djavax.net.ssl.trustStorePassword=secret -Durl=https://localhost:8983/solr/samplecollection/update -jar post.jar *.xml

In the above command, change :
  • Solr certificate password from secret to your solr certificate password. By default certificate password is secret.
  • Solr url with port number.
  • Solr core or collection name.


Now access the url https://localhost:8983/solr/samplecollection/select?indent=on&q=*:*&wt=json in browser and your will see the search results:




Now, we will try to create the sample ASP.NET MVC project using Solr.NET to access the newly created Solr Core:


  • Create new ASP.NET MVC project and add the SolrNet package via “Manage NuGet Packages”
  • Create the Product model:
  • Add logic to access the Solr Core via Solr.NET:
  • Now access the model in view to display required results from Solr instance:
The complete ASP.NET MVC code to verify the Solr connectivity present at https://github.com/AmitKumar-AK/CT.SC/tree/master/src/Foundation/Utilities/SolrIndexValidation

After executing the code, you will find the results from Solr core:


Now, we identified that, Solr instance accessible outside of Solr box from local system.

Next step is to deploy above created ASP.NET MVC application into Azure Web App and verify that it’s accessible or not. We can follow the link https://www.c-sharpcorner.com/article/deploy-asp-net-mvc-application-to-windows-azure/ to deploy ASP.NET MVC application into Azure. If Solr instance accessible from Azure Web App then it's mean there is no issue with the Solr.

Step-6: Validate name of the Sitecore cores in the Solr site if manually created
In the Step-1, we created the Sitecore Solr cores manually in Solr site and these name should be matched with Sitecore indexes name (which you can find via Showconfig.asxp in Sitecore).

By performing above steps, we found that there is no issue with Solr.

In the upcoming articles, we will verify the Solr Core's Schema and Sitecore instances (Content Delivery and Content Management) configuration files for Sitecore XP Single and XP Scaled topologies and will try to load the Solr indexes in the Sitecore Indexing Manager.

Note: In the above steps and code https://github.com/AmitKumar-AK/CT.SC/tree/master/src/Foundation/Utilities/SolrIndexValidation, please use your respective Sitecore , Solr installation folder and Solr Url.

 Sitecore Solr connectivity issue:
• Part-1 : Sitecore Solr connectivity issue details with ways to check the connectivity
Part-2 : How to resolve Sitecore Solr connectivity in Sitecore XP Single Topology
Part-3 : How to resolve Sitecore Solr connectivity in Sitecore XP Scaled/Distributed Topology
Share:

Sitecore® Technology MVP 2019

Featured Post

Sitecore SXA Web Accessibility Testing: Fix for Sitecore SXA Gallery Video component

Sitecore Experience Accelerator (SXA) Web Accessibility Testing: Fix for Sitecore SXA Gallery Video component The Web Accessibilit...

Total Pageviews

State Counter

Popular

About Me

My photo
Based in Bangalore, INDIA, Amit is a Sitecore MVP and MCC. He has an MCA from the U.P.T.U., INDIA and holds certifications including Sitecore and SharePoint 2007/2010. He is an contributor to Sitecore/MSDN communities and http://amitkumarmca04.blogspot.com/. Amit have experience in Sitecore, ASP.Net with C#, MVC, SharePoint, Classic ASP, VB,Macros,HTML,JavaScript,JSON,BootStrap and AngularJS.

Followers

Follow me on Twitter