Showing posts with label SITECORE. Show all posts
Showing posts with label SITECORE. Show all posts

Monday 2 October 2023

Sitecore Forms Bad Request Issue

If you are working on Sitecore form implementation, you might get Bad Request type issue after click of submit button or any action button on Form Page.


Fix
to overcome with this such type of issue, please make sure that form must have unique field name with without space.
If using multi-step Sitecore Form, then make sure each submit button must have unique name.

Friday 1 September 2023

What's New with Sitecore Search ?

Like others, I was also attendee and part of Sitecore community at SUGCON India 2023. It was great pleasure and tons of chat with everyone.

After the 2 days events, I tried to consolidate my notes and thought to share Best first with community. And Product name is Sitecore Search.


Before deep dive into Sitecore Search, I would like to point out few statements from tech communities.

Forrester, "43% of user directly go to Search box, and leads generated 2-3 times more as compare to normal journey".

Sitecore, "Today Search is about more than just entering words into a box and hoping for the right results".

Previously with Sitecore, for search we were using solr/azure/lucene search providers. and with that

Challenge for Content & Marketer, There is lack of tooling for search experience.

Challenge for Developer & IT

  • long time to implement
  • complex scenario for development
  • if any change request, then back to Team again
  • Search Expertise required

And on that Sitecore came with SaaS products to resolve above challenges and introduced 2 composable search new products.

  • For e-commerce search experience
    • Sitecore Discover 
  • Content Search experience
    • Sitecore Search


In this article, I will share detailed key features and benefits of using Sitecore Search.

Benefits of using Sitecore search
  • Great customer experience
  • Personalization - 100% automation [easy to configure by marketers]
  • Multiple Index sources, no need to changes existing external search indexing systems
  • Marketer Friendly, mean marketer can easily manage search experience without any technical knowledge
  • Trunkey setup building fast with simple implementation
A separate Sitecore search platform to manage, configuration on Search result items. Below are the major key points that can be used:
  • Track Site search performance
    • Overall engagement
    • Preview Search engagement
    • Search Page engagement
    • Recommendation engagement
  • All tracking data easily to download, sharing, exporting functionality with Marketers
  • Pages
    • Can have different result pages variants[A/B testing]
      • Can play with common widgets across pages
      • Can PIN results on particular searched key to show particular item on top
      • Can boost items on particular searched key
      • Can Personalized as well on particular searched key
      • Can burry Current or Blacklist current particular item based on usages
    • On Variations, we will be having section to get and modify items under Boost Rules, Burry Rules and Blacklist Rules
  • Analytics - to view analytics
    • Widget view
      • Content by views
      • Content by clicks
      • Content report by Date Range, devices, Region
    • Keyword view
      • On searched key, Content report by Date Range, devices, Region
      • Clicks, views, unique searches
      • How many search results based on searched key
      • Null searches
      • Biggest gainer and decliners
  • Catalog - to add different website as well, to get the results from different sources.
  • Administrator tools
With Sitecore Search, we will be having a feature to get other sites search results to manage. Mean that we can interact with Indexes resources (WEB and API Crawlers) using endpoints and can manage using available tooling.


Hope this will help to understand better about Sitecore Search.

Tuesday 29 August 2023

SearchStax Sitecore Schema populate Failing Issue

Recently we come to know with one of the known issue that if you install latest SearchStax module with Sitecore https://www.searchstax.com/docs/searchstudio/sitecore-module-2/ and then after creating new app using SearchStax Configuration module page.
Once new app created and then try to run Populate schema, will get solr connectivity exception.

Basically above issue coming because of timeout connectivity issue - and it is known by SearchStax.
Currently if you are facing such issue then

Please get latest hotfix Sitecore SearchStax official module. Directly installing will help to fix this issue.

 

Thursday 1 June 2023

How to fix Solr downtime issue

Recently I came across a scenario, where solr was down. And because of that Issue - all page which using solr logic related component having issue.


Solr down time issue might occur because of

  • Index got deleted
  • JVM full
  • Solr service stopped
  • Solr server having issue

To avoid such issue in future, most of the projects used base class for Search related logic. Please make sure try-catch mechanism applied.


try

{

using (var context = searchIndex.CreateSearchContext())

{   

  var queryable = context.GetQueryable<S>();

         //search logic   

          var results = queryable.GetResults();

          if (results == null) 

return new S[] { };

  return results.ToList();

}

}

catch (Exception e)

{

Log.Error(e.Message, e, this);

return new S[] { };

}

Monday 1 May 2023

DNS Switch for Sitecore SSO Enabled Application

Recently I worked on a scenario where after an application upgrade and before go live, we were looking to switch DNS for SSO enabled Sitecore Web Application.



There are few and simple steps to follow:

There will be 2 URLs (Live and Upgraded Application), let's say L and U

  • From Site Definition configuration file, swap hostName and targetHostName values between L and U config files.
  • Since we were using WSO2 for SSO authentication, and input request SAML settings were done in web.config, So just need to swap SAML setting values between L and U.
  • Please connect with your WSO2 team mate for SSO Url updates, by adding new ACS Url to authenticate with SSO.

That's it. For us after above 3 changes - it worked.

Wednesday 12 April 2023

sitecore create new content disabled Issue

 There are scenarios where on Sitecore Experience editor or from Page's presentation details - Associated Content Popup, for particular rendering will see Create new Content is disabled.






To resolve above issue, I found that if we did setup Datasource template on rendering more than one. Then above feature will automatically disable.

Because if we have more than one type of template for data item to be selected on rendering. Then Sitecore will get confused that after click Create New Content, which type of data item will created.


Note: Please make sure only one type of template path set on Rendering's Datasource Template field.

Thursday 1 September 2022

Sitecore order cloud certification strategy and planning

Last week I just completed my Sitecore order cloud Certification. 




Objective of this article is about to share learning order cloud and information, pre-planning and strategy for Sitecore order cloud Certification Exam.

Preparation I personally did not felt difficulty regarding content, topics and practice platform to learn Sitecore order cloud or for exam material.

I just went though Sitecore Order Cloud e-learning course and Order Cloud Portal and that's enough for both learning and exam.

For me it took approx. 3 days to learn and practice with API. 

Topics 

  • I would suggest to first understand order cloud terminologies
  • About Sandbox Base API URL, Region and other properties.
  • About User Context: Shared, API Client
  • About Buyer organization and Buyer mapping with API practice
  • About Buyer, Seller, Supplier and order Flow
  • About Product and Price schedule mapping with API practice
  • About B2B and B2C scenario from e-learning Portal
  • Data flow on Sandbox during development
  • Get User list, Buyers list and Product List using API.
  • Add/Remove/Update products from Catalog or categories or from User group.
  • Workflow: Password, Client, Refresh and Elevated with example from API call.
  • Refresh workflow benefits and example.
  • Marketplace scenario, how can work with Parallel marketplace.
  • Reseller scenario and flow.
  • In which scenarios, Product not used to visible.
  • How actually webbook works. example and scenarios.
Strategy
  • Few questions will be scenarios based - like discount calculations or products on live Site - that I felt after course completion and with practice easily answerable.
  • Noticed not many multi-choice questions - so less complex as compare to previous exam.
  • Questions are very related and if practiced or worked - easily can answer.
  • All content, official documentations and API details, possible API parameters - properly mentioned and shared.

I would highly recommend to at-least learn order cloud, if not planning for Certification or Exam. Best to have.

Good luck for yours...

Wednesday 3 August 2022

How to remove a rendering from page list using Sitecore PowerShell script ?

 There might be scenario, where 

  • remove a rendering from list of pages/Tree
  • remove broken rendering from Tree

Above we can achieve using Sitecore PowerShell script

$pageTemplateId = "{4A990Q43-71FD-4DAC-8865-5ABAAA13R911}"
$startPath = "master:/sitecore/content/YourSiteNode/Home/"
$useFinalLayout = $True
$useSharedLayout = $True
$rootItem = Get-ChildItem -Path $startPath -recurse | Where-Object { $_."TemplateID" -eq $pageTemplateId };
if($rootItem -ne $null) {
foreach($item in $rootItem) {
$renderings =  Get-Rendering -Item $item -Placeholder "/header/primary-menu" -Device (Get-LayoutDevice "Default") -FinalLayout:$useFinalLayout
foreach($rendering in $renderings) {
    $renderingItem = Get-Item -Path $rendering.ItemID
if($renderingItem.Name -eq "YourRenderingName") {
    Remove-Rendering -Item $item -Instance $rendering -Device (Get-LayoutDevice "Default") -FinalLayout:$useFinalLayout
    Write-Host $item.Name
}
}
}
}

Saturday 26 February 2022

HTTP Error 500.19 - Internal Server Error Sitecore identity server

  



If you are facing the below issue with Sitecore 9, 10, or 10.1. Then it is recommended to install the below dependency to resolve this issue.

https://dotnet.microsoft.com/download/dotnet-core/2.2

But before installation, I would suggest verifying existing .netcore in your system
by running dotnet --info on PowerShell (as admin)


Hope this will resolve your issue.



There is also another possibility for this issue that from 
Turn Windows feature on or off - choose below options


You may also face still face the same issue with Sitecore 10.2 
in that case you must be required to install as this is recommended by Sitecore https://doc.sitecore.com/xp/en/developers/102/sitecore-experience-commerce/system-requirements.html

Please go to this link to download https://dotnet.microsoft.com/download/dotnet-core/3.1

Hope the above options will help you to fix this issue.

Monday 24 January 2022

How to start with Sitecore JSS using react framework ?

Hope you are already aware of the basics of Sitecore JSS and react as well. Here in this article, we are going to 

  • Setup Sitecore JSS app with React framework
  • Connect/Map JSS app with Existing Sitecore Instance
  • Deploy JSS App to Existing Sitecore Instance

NOTE: I did a setup with Sitecore 10.2, but you can choose as per your need.

The steps are as below

  • Sitecore 10.2 setup - without SXA [ex: sc.dev.local]
  • Sitecore PowerShell extension 6.3
  • install Sitecore package by clicking JSS compatible module 
  • create JSS key in masterdb /sitecore/system/Settings/Services/API Keys/
  • goto Repo location (where wanted to create Sitecore JSS Application)
  • install jss cli by cmd/powershell as admin and run below command
  • >npm install -g @sitecore-jss/sitecore-jss-cli
  • To create Sitecore JSS app using react framework run below command
  • >jss create jssapp react
  • >jss start [to check it's working]
  • add new site binding dev.local instance as jssapp (HTTP) and make host entry in C:\Windows\System32\drivers\etc
  • run and check http://jssapp/
  • run command >"jss setup" and add details as requested
  • please verify hostname from JSSAppLocation/sitecore/config/jssapp.config
  • run command >"jss deploy config" [To deploy Sitecore JSS Application config to Sitecore instance]
  • run command >"jss deploy app -c -d" [To deploy everything from Sitecore JSS Application to Sitecore instance]
  • verify again "http://jssapp" [To verify JSS application changes on hosted Sitecore instance]

Hope this will help you to set up quick with the Existing Sitecore instance.

Tuesday 23 November 2021

Steps to setup SearchStax in Sitecore for multi-site

Previously we setup SearchStax with Fresh Sitecore Instance and that will fulfill requirement for one Search Page on Single-site Sitecore Instance.

Now there will be scenarios like

  • Global Search page that will list result from Multi-Site
  • For each Site(In multi-Site), there will be Separate Search Pages

In this article, will implement Global Search Page that will list result from Multi-Site

Steps to Setup Global Search Page will be same as previous article SearchStax with Fresh Sitecore Instance.
Only need to update root entry and update by adding multiple root entries while Creating SearchStax Index as below




Hope this help.
In next article we will setup multi Search pages for each Site.


Step by Step to Setup SearchStax with Sitecore

In this article, We will do setup SearchStax with running Sitecore Instance. 



Setup Prerequisites

  • Sitecore Instance must be up and running (where we will be setting up SearchStax)
searchstax-compatibility
  • Before Installation, please collect SearchStax's Credentials for 
    • SearchStax Portal
    • Collect Search and Suggest API URL from https://searchstudio.searchstax.com/apps-management Search API Section
    • Solr read-only and Admin (Username/Password) from below Location
    • To get Index Core Name - Go to Search URL from https://searchstudio.searchstax.com/apps-management Search API Section. For example: https://xxxxxxx.searchstax.com/solr/Index-Core-Name/emselect



Steps to Setup Searchstax
  • Login to Sitecore Instance
  • Install Searchstax module as per compatibility (Can take reference from above Prerequisites)
  • Once package installation done, configure Searchstax index from Launchpad View or by URL https://YourInstance/searchstax/configuration
searchstax-index-configuration


searchstax-index-configuration

  • Once clicked on Sitecore Module Configuration, will see below screen. After this click on Create An Index and fill all details (As per mentioned, in above Prerequisites)

searchstax-index-field-details


  • Once Index creation done, Go to Control Panel and trigger below action
    • Click on Populate Solr Managed Schema (select only SearchStax Index)
    • Index Managed (select only SearchStax Index)


  • Now From Searchstax setup is done. To verify with Sitecore will add Search Page Item and then Publish Search Page.



Hope this was easy and helpful to you. Please share if face any challenge during Setup.

Note:
  • Please make sure to save and Publish after every Change.
  • All above Steps must need to be done sequentially.
  • After Every Changes in configuration File, Need to Click Reload Schema from Searchstax Portal.

Sunday 14 November 2021

Introduction to SearchStax - Search with Sitecore

There are various providers to implement Search with Sitecore Instance. Today's article will help to understand about Searchstax with Sitecore.

Currently we have options as provider to implement search like - Lucene, solr, azure. Also tools that makes search Implementation easy, fast and with analytics features - Coveo & Searchstax.

But with my experience on Searchstax there are below points as feature which makes it unique and reason to use Searchstax.

1. Readymade Search (ready to use with any Sitecore project in next 10 mins) with Multi-site options - with no code change required.

2. Easy interface to manage analytics and only Integration activity from Sitecore CMS.

3. Custom Search Page Implementation (Can change any existing Custom search page provider connection from existing to SearchStax search API)

searchstax-sitecore


There are also list of features with SearchStax to use for Search analytics

facet, sort, hit highlighting

Stop words, synonyms, spell check and auto-suggest

Field boosting, rules and Promotions

Reporting options on Search analytics

Readymade search page theming, Preview feature on Search page.


Benefits to use Searchstax for search

High availability, no field limits

Search item's click or searched key level tracking

No-additional pre-requisites skill required for developers

 

There is no change for below points

for computed index, there is no change in code/configuration to implement.

Field/Template include/exclude configurations are same as with other providers.

Connect to any environment search index from developer's machine.

From developer's machine - index setup and code debugging as very easy [bcz of search endpoint API].


Friday 1 October 2021

How to fix Sitecore xConnect 403.16 issue ?

In this article, will share steps to fix issue - Sitecore xConnect throwing 403.16 - forbidden

Below are the steps to resolve:

1. go to IIS and select your instance's xConnect site. (Let's say mylocal.xconnect)

2. double click on SSL Setting


3. update settings as below

4. Now hit your instance, (e.g. https://mylocal.xconnect)

Hope this work. If still issue please comment.




Saturday 11 September 2021

Custom data source on Sitecore template field

 Actually there are many ways to apply data source on Template's Field, Rendering Item, Rendering data source Location and Rendering parameter. 

  • using sitecore data item path/id
  • using sitecore query/fast-query
above both - most used ways.

But there are many scenarios, where after applying data source path wanted final list after modified data by type, filtering, custom code logic or any dynamic logic on data source .


Custom class as data source
We can do this activity as well using custom class, and we can call them on 
 by setting data source Field value as

code:Sitecore.CustomDataSources.UpdateDataSource,Sitecore.CustomDataSources

custom-data-source-sitecore-template-field


PowerShell script as data source
There are also another way to do this using PowerShell script.

by setting data source value as 
script:/sitecore/system/Modules/PowerShell/Script Library/CustomDatasource

and place your PowerShell script at above location with File name as CustomDatasource



Hope this will help.

Friday 27 August 2021

Sitecore dropdown fieldtype validation

In this article, we will try to achieve droplink's field validation. So to before start there is a concept that sitecore droplink actually store item's ID.

And to achieve this we have to apply validation on dropdown fields, just apply regex there as ^.{38}$. 



Please see below screenshot



Hope this will help.



Friday 30 July 2021

Sitecore control panel local indexes issue - indexes not listing

In this article, we are going to explain about very common issue -  local indexes issue

Few days back, I was also facing same issue that while trying to rebuild one of index from control panel.
There were no index listed on Indexing manager.

As I have attached screenshot



After looking at configs and running services.

Found that core name are not correct (as compare to search engine).
Since we are using solr, so we looked configs as

App_Config/Sitecore/ContentSearch/

~/Sitecore.ContentSearch.Solr.Index.Master.config

~/Sitecore.ContentSearch.Solr.Index.Web.config

~/Sitecore.ContentSearch.Solr.Index.Core.config 

and compared core with Solr admin portal (my instance solr url is : https://localhost:8983)

and correcting corename into configs, indexes started listing.


Hope this will help.

Thursday 17 June 2021

Rich Text Editor “Object reference not set to an instance of an object.” Issue



 There are situation, where on the click of show editor button for RTE field on an item may get issue as 

Rich Text Editor “Object reference not set to an instance of an object.” yellow screen error as popup


To resolve this issue there are few approach to verify (is there any item missing in CORE DB)

Apporach-1:
In Sitecore CMS, switch to Core db from right botton (Desktop view screen).
After that go to path /sitecore/system/Settings/Html Editor Profiles and verify that all expected RTE items exist or not?

Can check number of RTE items from working same instance (from other upper env, dev instance).

If any mismatch, then create package from there and installed at target instance.

IT works for me.

Apporach-2:


and see issue, if it works then approach 1 will be the fix.


Hope this will.

Friday 4 June 2021

Sitecore solr MaxBytesLengthExceededException issue while index rebuild

While triggering index rebuild from Sitecore control Panel, may get below issue as

SolrNet.Exceptions.SolrConnectionException: <?xml version="1.0" encoding="UTF-8"?>

<response>

<lst name="responseHeader">

<int name="status">400</int><int name="QTime">2147</int></lst><lst name="error">

<lst name="metadata"><str name="error-class">org.apache.solr.common.SolrException</str>

<str name="root-error-class">org.apache.lucene.util.BytesRefHash$MaxBytesLengthExceededException</str></lst>

<str name="msg">Exception writing document id sitecore://web/{629c0a43-8382-4aa6-10e8-eb2c0fd5460a}?lang=en&amp;ver=2&amp;ndx=YOUR_INDEXNAME

to the index; possible analysis error: Document contains at least one immense term in field="INDEXEDFIELDNAME" (whose UTF8 encoding is longer than the max length 32766),

all of which were skipped.  Please correct the analyzer to not produce such terms.  The prefix of the first immense term is: '[72, 117, 109, 97, 110, 32, 82, 101, 115, 111, 117, 114, 99, 101, 115, 32, 124, 32, 52, 48, 48, 32, 124, 32, 50, 53, 32, 124, 32, 87]...', 

original message: bytes can be at most 32766 in length; got 58214

Perhaps the document has an indexed string field (solr.StrField) which is too large</str><int name="code">400</int></lst>

</response>

 ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.


Possible Fix:

As I tried to highlight useful information from above log and it seems that we are facing size issue for string Field type in solr.

string Field have max size of 32K (32766) and trying to store 58214 char that is why got exception.

one solution is to change fieldType

From the computed Index configuration file, change returnType for indexField as "Text" after removing "String"

This works for me, hope for you as well.

another solution is to bypass index for this particular file. For that there is a setting in config StoreLocation="true" but I do not feel this will be good approach.

Wednesday 2 June 2021

Install-SitecoreConfiguration : Cannot validate argument on parameter 'Signer'. The “$_.HasPrivateKey -eq $true”

 Are you facing below issue while setting fresh Sitecore (9.x version) instance ?

Install-SitecoreConfiguration : Cannot validate argument on parameter 'Signer'. The “$_.HasPrivateKey -eq $true”



Then I would suggest to follow below steps sequentially as

  • Close PowerShell session, where installation were going on.
  • Remove/cut to other location all certificates from C://certificates
  • go to installation path and open xconnect-createcert.json
  • Now search key named as StoreLocation in this file
  • and then change value as LocalMachine


Hope this will help to resolve above issue.