Posts

Showing posts from April, 2024

Understanding Forms in Sitecore XM Cloud

Image
Hello everyone!! In this blog we are going to see how we can create Forms in XM Cloud using Forms feature recently introduced. we will create an webhook submit action to show the posted data. We will create a sample form in XM Cloud. Follow the screenshot below as most of the things will be. I will add the notes whereever its required. Select Form from Tools tab . Create Form and Save Form Builder We need to select a layout. Select Full width layout from Layout tab and drag it to page. After that navigate to Items tab which will have fields that can be drag and drop to layout to create the form. Form Builder Drag and Drop Short Text field for Full Name and Email. Select the Individual Fields. You will get lot of properties for that selected field. Modify according to one's need. Refer below screenshot for your reference. Navigate to Settings tab in Form Builder . We will configure thank you message,error message, webhook actions. Webhook is basically an HTTP R...

How to write Solr query using SolrNet

Hello everyone, in this blog we will learn how we can write some solr query in c# backend using SolrNet . The first thing you need for this is to add the SolrNet dll reference to your project. Step 1 : Import this two namespace in your controller using SolrNet; using SolrNet.Commands.Parameters ; Step 2 : Create new instance of Solr query. Then create a list of array of fields in Solr where the search keyword will be searched. For example on title field, navigation title, description etc. See below code snippet for your reference var query = new SolrQuery("*:*"); if(!string.IsNullOrWhiteSpace(keyword)) { var q = new[] { $"(metakeywords_t_{language}:{keyword}", $"(title_t_{language}:{keyword}", $"(navigationtitle_t_{language}:{keyword}", $"(description_t_{language}:{keyword}", $"(pagecontent_t_{language}:{keyword}", }; query = new SolrQuery(string.Join(" ", q)); } Step 3 : Add filters to mak...

Facing Error With Solr Docker Service Not Healthy

Image
Hello everyone, in this blog i will discuss an error which i faced when working docker solution. Whenever i was running may up.ps1 script, sometime my Solr service was failing giving some error related to ZooKeeper and it becomes unhealthy. Because of this Sitecore instance was failing. For my case,check the below error message INFO: Solr configuration not found in 'c:\\data', copying clean configuration... 2024-04-03 05:40:49.880 INFO (main) [ ] o.e.j.u.log Logging initialized @5034ms to org.eclipse.jetty.util.log.Slf4jLog 2024-04-03 05:40:50.349 INFO (main) [ ] o.e.j.s.Server jetty-9.4.44.v20210927; built: 2021-09-27T23:02:44.612Z; git: 8da83308eeca865e495e53ef315a249d63ba9332; jvm 1.8.0_252-b09 2024-04-03 05:40:50.380 INFO (main) [ ] o.e.j.d.p.ScanningAppProvider Deployment monitor [file:///C:/solr/server/contexts/] at interval 0 2024-04-03 05:40:54.646 INFO (main) [ ] o.e.j.w.StandardDescriptorProcessor NO JSP Support for /solr, did not find org.apache.jasper....