Category: Sitecore

Installing Sitecore 10 using SIA(Sitecore Install Assistant)

Sitecore 10 is out! I tried installing it using SIA(Sitecore Install Assistant) along with SXA and it installed smoothly without any errors!

Prerequisites: 

No need to install any prerequisites(includes Solr, SIF) manually, SIA will take care of it.

Preparation:

  • Download installation package (Graphical setup package XP Single) from here.

Installation:

  • Extract the file zip file downloaded and click on Setup.exe
  • Install the prerequisites to make sure the required SIF and Windows Server prerequisites are up to date.
  • Install Solr 8.4.0 by filling Port, Windows service path prefix and Install path and Install.

Note: Make sure the port number is different from earlier versions of Solr installed. 

  • Fill out site prefix, admin password (going with b, so easy to remember) and Confirm password (new to Sitecore 10), and license file path.
  • Fill out SQL server instance name, admin username and password.
  • Double-check the Solr URL (browse to make sure it’s running successfully), System root and Windows service name
  • Select optional module SXA if you need. I’m going for it, time to explore SXA! Would be nice if Horizon is listed here.
  • Review the summary to make sure the settings are correct.
  • SIA validates to make sure the files look good.
  • Install. This takes around 10 minutes (you can get a coffee!). If it errors out, check out the log.

Yayy!! It’s installed. Is it easy to install with SIA? It’s indeed a great tool!  

Check out the release notes for what’s new in Sitecore 10.

Error:

While installing got this error –

Failed to start service ‘Sitecore Marketing Automation Engine – sc10.xp.dev.localxconnect.dev.local- MarketingAutomationService (sc10.xp.dev.localxconnect.dev.local- MarketingAutomationService)’.

Failed to start service Sitecore Marketing Automation 
MarketingAutomationService

Failed to start service Sitecore Marketing Automation – MarketingAutomationService

Resolution:

This could be due to a license expiry issue. In my case, I had a valid license file. Resolved the issue by moving the non-self signed certificates to trusted certificates. 

I ran this command as an admin and got a couple of certificates that were non-self signed.

Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_Subject }

Now I moved it to Trusted Root by running the following command.

Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_Subject } | Move-Item -Destination Cert:\LocalMachine\CA

 Failed to start service Sitecore Marketing Automation Engine

Moved Non-Self Signed Certificates to Trusted Root

After moving, I tried the SIA again and it worked perfectly.

Happy Sitecoring!

2

Sitecore Horizon 9.3 Install, Troubleshooting, and Uninstall

I want to share my experience on the Installation of Sitecore Horizon 9.3, Uninstallation, and the errors I faced during installation.

Prerequisites

  • Install Sitecore 9.3 
  • Ensure CMS site is accessible with https protocol
  • Ensure WebSocket Protocol enabled

After installing the tools, restart your machine.

Installation

  • Download Horizon 9.3 from here. I downloaded the on-premises deployment.
  • Extract the zip file and open Parameters.ps1
  • Fill out the below parameters –
  • Run install.ps1 in Powershell Administrator mode
  •   Once the installation is done (only takes 2 to 3 minutes), you will see a new Icon in Sitecore 
  •   Clicking the Icon opens Horizon (yes, it’s separate IIS site) and you can explore the new features!

Troubleshooting Error

I faced this error after the installation was successful. When I opened Horizon, here is the error message I got.

Failed to render a page: Failed to render the root extension, with error: Failed to render a fragment. Status code: InternalServerError, message:

I checked the logs (C:\inetpub\wwwroot\[Hoirzon Website\logs) and it showed below message

[1] Ensure that Node.js is installed and can be found in one of the PATH directories. Make sure the Node executable is in one of those directories, or update your PATH.

I verified that the Node.js path (C:\Users\manbalagan\AppData\Roaming\nvm\v10.16.0\) was accessible and PATH was correct.

Also, I uninstalled Node v10.16.0 and reinstalled. Restarted my machine. Nothing helped.

Finally, I resolved the issue by adding ‘Everyone‘ permission and allowed full control to NVM folder (C:\Users\manbalagan\AppData\Roaming\nvm) fixed the issue! IIS couldn’t access the folder without ‘Everyone’ permission.

Uninstall

If you want to uninstall the failed versions (to clean up IIS sites it created), here is how you can do it –

  • Uninstalling is straight forward – just need to run the uninstall.ps1 script 
  • After uninstalling, it didn’t remove the Horizon Icon in Desktop mode. Clicking on the icon goes to 404 page.  It would be clean if the icon is also removed.

Hope this helps someone. Any issues, let me know in comments section.

Happy Sitecoring!

0

5 Essential Sitecore Chrome Extensions

Browser Extensions are handy and easy to use without leaving the tab. Here are the top 5 Sitecore Chrome Extensions I use daily and it saves ton to time! 

Sitecore Author Tool Box

Author: Ugo Quaisse

This extension is a lifesaver and must have! Here is the set of handy tools into Content Editor. Favourites Bar, Desktop notifications, and Dark mode are my favorites.

Download link

 

Sitecore Extensions

Author: Alan Płócieniak

This tool is super helpful, has great features. You can just Ctrl+ Space to search for commands. 

Download here

Also when in the Web database, it shows the red bar on the top to make sure you are not editing in Web DB!

The latest version 3.3 is released, check out the new features here

 

Sitecore Icon Search

Author: Gabriel Streza

This is my favorite extension. You can search and add Sitecore icons without ever leaving the tab.

Download here

Once you choose the icon, it automatically sets the Icon field on the template, and the icon’s relative path is still be copied into the clipboard! 

 

Sitecore Developer Tool

Author: Vlad Shpak

This tool allows navigating to admin pages like cache, serialization, show config (I use this most of the time), etc.  Also, you can switch between databases or set a new database on the options page. 

Download here

Additional tip: If you want the pages to open in a new tab, you can set it in option page and also add any admin pages you want like below

 

Sitecore Analytics Testing Tools

Author: Derek Hunziker

This is a fantastic tool for testing GeoIP and Analytics.

You can clear analytics-related cookies and specify a forwarded IP address for GeoIP lookups.

Download here

 

Pro-Tip:

You can use the same extensions in Microsoft Edge by copy and pasting the same Chrome link in the Edge browser.

Select Allow extensions from other stores in the banner at the top of the page and confirm the popup.

Select the Add to Chrome button and the extension is now added to Edge.

Learn more from here.

 

Hope this helps. Any questions, leave a comment below.

Happy Sitecoring! 

0

Generic method to read values from any type of Form fields

Are you looking for a generic method to read the values from any type of Sitecore Form fields? Here is the solution.

         private static Dictionary<Guid, string> FormFieldsToDictionary(IList<IViewModel> fields)
		{
			Dictionary<Guid, string> fielDictionary = new Dictionary<Guid, string>();
			foreach (var field in fields)
			{
				fielDictionary.Add(Guid.Parse(field.ItemId), field.GetType().GetProperty("Value")?.GetValue(field, null)?.ToString() ?? string.Empty);
			}
			return fielDictionary;
		}
	private static string GetValue(IViewModel field)
		{
			if (field == null)
			{ return default(string); }


			if ((field as StringInputViewModel) != null)
			{
				return (string)(object)(field as StringInputViewModel).Value;
			}

			if (field is ListViewModel)
			{
				var listField = (ListViewModel)field;
				var array = listField?.Value?.ToArray();
				if (array == null)
				{
					return string.Empty;
				}
				return String.Join(",", array);
			}

			if (field is DateViewModel)
			{
				var dateField = (DateViewModel)field;
				return dateField.Value.HasValue ? dateField.Value.Value.ToShortDateString() : string.Empty;
			}

			if (field is NumberViewModel)
			{
				var numberField = (NumberViewModel)field;
				return numberField.Value.HasValue ? numberField.Value.ToString() : string.Empty;
			}

			if (field is TextViewModel)
			{
				var textField = (TextViewModel)field;
				return (string)(object)textField.Text;
			}

			if (field is CheckBoxViewModel)
			{
				var checkbox = (CheckBoxListViewModel)field;
				return (string)(object)checkbox.Value;
			}


			return default(string);
		}

Utilization:

protected override bool Execute(UpdateContactData data, FormSubmitContext formSubmitContext)
		{
			var fieldsDictionary = FormFieldsToDictionary(formSubmitContext.Fields);

           // From here you can create a model from fieldsDictionary, call any API and return call status

       }

Hope this helps someone. Any questions, leave a comment.

Happy Sitecoring!

0

What’s new in Sitecore Forms 9.3

You can now publish the forms within Forms Designer. No need to navigate to Content Editor to publish. This is pretty handy when developing forms.

Users can now delete submitted data for a particular form and specify a date range.​​

You can now use the Sitecore bot detection functionality to verify whether visitor is human. This removed the need for a Captcha element. Nice work Sitecore!

Now the forms element that allows you to add email confirmation to a form.​​

Users can now use the Redirect submit action to redirect to a URL and pass parameters to it.

To add file upload functionality to your forms, you can now use the File upload forms element. I use to utilize the Forms Extensions module(It’s very nice), it’s now included in forms element. 

 

Apart from these, there are bunch of enhancements made  – 
  • Improved database performance by increasing our ability to prevent deadlocks.​
  • You can now use the client-side API to retrieve form fields, for example when you build a custom submit action that needs to show all the form fields.
  • You no longer need to rebuild the master index after you install Sitecore XP.

 

Hope this helps. Any questions, leave a comment below.

Happy Sitecoring!

0

Tips and Tricks: Re-index item(s) faster

I recently came across a scenario where I wanted to reindex a specific item(s)/folder instead of the full content tree. 

Typically I would have reindexed from Indexing Manager in Control Panel which takes a good amount of time to rebuild all items.

Instead, I chose the item(s)/folder, navigated to the Developer tab, and clicked Re-Index Tree. It was done in less than a minute! 

This will rebuild the Item(s) to all the indexes in your solution and I feel this is very quick as compared to traditional re-index.

Note: If you don’t see Developer tab in the menu, you need to enable it by right-clicking on the menu and select the developer option.

Note: Same trick works with Web DB when you switch it in Sitecore Desktop.

Hope this helps someone. Any questions, leave a comment.

Happy Sitecoring.

0

Install Sitecore 9.3 (using SIA) quickly in 20 minutes!

I’m participating in Sitecore Hackathon 2020 for the second time. One of the requirement is to have sitecore 9.3 installed on your machine except for commerce . I want to share my experience how i quickly installed Sitecore 9.3 using SIA(Sitecore Install Assistant) in 20 minutes!

Note: No need install any prerequisites(includes Solr) manually, SIA will take care of it.

Preparation:

  • Download installation package (Graphical setup package XP Single) from here.

Installation:

  • Extract the file zip file downloaded and click on Setup.exe
  • Install the prerequisites if needed. 
  • Install Solr 811 by filling Port, Windows service path prefix and Install path and Install.

Note: Make sure the port number is different from earlier versions of Solr installed. 

  • Fill out site prefix, admin password(going with b, so easy to remember) and license file path.
  • Fill out SQL server instance name, admin username and password.
  • Fill out the Solr URL, System root and Windows service name

Note: Go to Solr URL to make sure it’s running successfully.

  • Select optional module SXA if you need. I’m going for it, time to explore SXA! Would be nice if Horizon is listed here. 
  • Review the summary to make sure the settings are correct.
  • SIA validates to make sure the files look good.
  • Install. This takes around 10 minutes (you can get a coffee!). If it errors out, check out the log.

Yayy!! It’s installed. Is it easy to install with SIA? It’s indeed a great tool!

Check out the release notes for what’s new in Sitecore 9.3 here

Happy Sitecoring!

0

My 2019 Reflections

2019 is going great so far, wanted to share my contributions to the Sitecore community(Awesome!).

Presented Sitecore 9 Forms(Intermediate/Advance) in 7 SUG’s-

• April 18 2019 – SUG Bulgaria
• May 4 2019 – SUG Bangalore
• June 4 2019 – SUG Manchestor, NH
• June 6 2019 – SUG Belarus
• June 12 2019 – SUG Boston
• June 25 2019 – SUG NCR(Delhi -India)
• Aug 29 2019 – SUG Educador

 

The blog posts I have written and one of my blog post received ‘You are life saver, Thank you’ comment.

• Install Sitecore 9.1 quickly in 5 easy steps
• Sitecore 9 Forms: Redirecting to formbuilder on Submit?
• Sitecore 9 Forms: The required anti-forgery cookie __requestVerificationToken is not present
• Sitecore license file expired?
• Sitecore 9.1 Forms: Conditional Logic
• Sitecore 9 Forms: Custom Control – Conditional Section
• Sitecore 9 Forms: Success message
• Sitecore 9 Forms: Custom Submit Action
• Tips and Tricks : GIT Cherry Pick
• Sitecore Certification : Exam and Review
• Sitecore 9 Forms: Save Data
• Sitecore 9 Forms: Custom Regex Validation
• Sitecore 9 Forms: Custom Grouped dropdown
• Sitecore 9 Forms: Uncaught TypeError: Cannot read property ‘unobtrusive’ of undefined
• XConnect: Certificate was not found
• Sitecore 9 Forms: Access landing page fields in FormSubmitContext?
• Sitecore 9 Forms: The date range is invalid. Please select a date range that is within the range of the list.
• Sitecore Forms: Export Data to CSV shows Field Types on column header?
• Sitecore Forms: Redirecting to External URL

Youtube
• How to add Forms Custom Submit Actions – https://www.youtube.com/watch?v=wE_aaFN7GvY

Slack Community
• Active on #wffm-forms

Certification
• Sitecore 9.0 Certified Platform Associate Developer

Participation
• Hackathon

Conferences I attended
• SUGCON India
• SYMPOSIUM
• All SUG Boston meetups.

2020 Plans

Learn and contribute

  • Cortex
  • Sitecore AI Personalization
  • Sitecore 9.3 Forms
  • Sitecore 9.3 Overall

Co-organize (Virtual)

  • Quarterly SUG-Pittsburgh meetup

Present

  • SUG Meetups
  • Sitecore SUGCON EU/Symposium 2020
0

Sitecore Forms: Export Data to CSV shows Field Types on column header?

I exported the Forms data using Export the selected data into CSV button and noticed one of the column header was showing field type not field name.

I checked at many places, couldn’t figure out. Later I checked on Content Editor – Forms and found that item name was showing the field type!

I gave the appropriate Field Name in Forms and the CSV file looks good now. 

Forms Field Name sets Item Name and Label sets the Title field in Content Editor.

Don’t forget to publish the Forms!

Happy Sitecoring.

0

Sitecore Forms: Redirecting to External URL

I came across a scenario where I need to redirect to a external url(thank you page) after form submission. It’s achievable using formSubmitContext’s RedirectUrl property on your Custom Submit Action.

Here is the code snippet – 

protected override bool Execute(string data, FormSubmitContext formSubmitContext)
		{
//Prepare model
//WebApi Call

//Redirect to external URL
var thankYouPageUrl = $"{HttpContext.Current.Request.Url?.Scheme}://{HttpContext.Current.Request.Url?.Host}/[thank-you-page-path]/";

formSubmitContext.RedirectUrl = $"{thankYouPageUrl}?id={add-any-querystring-if-needed}";
formSubmitContext.RedirectOnSuccess = true;              
return true;

}

Hope this helps someone. Happy Sitecoring!

0