I was working on Sitecore SXA 10.3.1 and the workflow was somehow messed up.
Manually modifying can be time-consuming and error-prone. Sitecore SPE is a powerful tool that allows for efficient modification of content in bulk through find and replace text functionality.
In this article, we will explore the steps of using Sitecore SPE to quickly and easily bulk update workflow, streamlining the process, and saving time.
Dry-Run Script:
Running the script won’t make any changes to items, it will give the items that are going to be modified.
While working on a Sitecore 10.2.1 XM project, we relied on packaging content from upper environments or restoring the database to pull content locally, which was quite time-consuming.
The Sitecore Sidekick module (a big thanks to Jeff Darchuk) was a lifesaver for quickly pulling content into local or lower environments.
The latest Sidekick version is 1.7 and I was wondering which version will be compatible with Sitecore 10.2.1 and realized it doesn’t matter!
Installation
In NuGet, install the following modules in one of the Foundation projects or create a new helix module.
SitecoreSidekickFoundation
SitecoreSidekickContentMigrator
SitecoreSidekickCore
SitecoreSidekickAuditLog
SitecoreSidekickEditingContext
Note: You can skip AuditLog and EditingContext if don’t want it.
After installation, you will see the following DLLs in the bin folder
Configuration
Create a folder Sidekick under App_Config/Include in the Foundation layer.
Add the following Config files as it is, no changes are needed.
We have some secure PDFs in Media Library that were not getting indexed in Solr – They couldn’t be extracted using the PDFSharp library.
The logs were showing the error while extracting secure files
16804 12:04:53 ERROR DefaultMediaItemTextExtractor: Cannot extract content from media item with id ‘{442006A5-8CB6-4ABE-8855-786D2A870201}’. Exception: PdfSharp.Pdf.IO.PdfReaderException Message: The PDF document is protected with an encryption not supported by PDFsharp. Source: PdfSharp at PdfSharp.Pdf.Security.PdfStandardSecurityHandler.ValidatePassword(String inputPassword) at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider) at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider provider) at Sitecore.ContentSearch.ContentExtraction.Readers.PdfSharpReader.ReadAll(String filePath) at Sitecore.ContentSearch.ContentExtraction.Common.DefaultMediaItemTextExtractor.ExtractTextFromMedia(MediaItem mediaItem)
38536 12:04:53 ERROR DefaultMediaItemTextExtractor: Cannot extract content from media item with id ‘{442006A5-8CB6-4ABE-8855-786D2A870201}’. Exception: PdfSharp.Pdf.IO.PdfReaderException Message: The PDF document is protected with an encryption not supported by PDFsharp. Source: PdfSharp at PdfSharp.Pdf.Security.PdfStandardSecurityHandler.ValidatePassword(String inputPassword) at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider) at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider provider) at Sitecore.ContentSearch.ContentExtraction.Readers.PdfSharpReader.ReadAll(String filePath) at Sitecore.ContentSearch.ContentExtraction.Common.DefaultMediaItemTextExtractor.ExtractTextFromMedia(MediaItem mediaItem)
After the installation is completed open the following URL http://localhost:9998 to see if it is working as expected. You should see the welcome message!
Add the following patch file into App_Config/Include/zzz folder to replace DefaultMediaFileTextExtractor from Sitecore.ContentSearch.ContentExtration.
Last step – Let’s add Tika URL into ConnectionStrings.config file.
The latest version Sitecore 10.3, is packed with new features and enhancements that make it easier than ever to manage your digital content and deliver personalized experiences to your customers.
If you’re looking to install Sitecore 10.3 XM, one of the easiest ways to do it is by using the Sitecore Install Assistant (SIA). In this blog post, let’s walk through the steps to install Sitecore 10.3
Prerequisites:
A Windows machine with a minimum of 16GB of RAM
Microsoft SQL Server 2017 or later
IIS 10 or later
.NET Framework 4.8 or later
Microsoft PowerShell 5.1 or later
Preparation:
Download the installation package (Graphical setup package XM scaled) from here.
Installation:
Extract the downloaded zip file
Right-click on the Setup.exe and execute in Administrator mode
Install the prerequisites
Install Solr 8.11.2 by entering the Port, Windows service path prefix, and Install path
Fill out the Siteprefix, admin password(going with b, so easy to remember), and choose the Sitecore license file
Fill out the SQL server Instancename, admin username, and password.
It auto-fills Solr URL, System root, and Windows service name
Note:Navigate to Solr URL and ensure it’s running as expected
Select the optional module if you plan to create a Headless SXA site
Review the summary to make sure the settings are correct
The Installation wizard in SIA validates all the settings before starting the install
Installation takes around 10-15 minutes (you can get a coffee!). If it errors out, check out the log.
Yayy! It’s successfully installed. Is it easy to install with SIA? It’s indeed a great tool!
Let’s log in and explore!
Roadblocks:
Error # 1: Solr access to the path denied
Solr installation failed with error – Access to the path ‘C:\Users\MANBAL~1\AppData\Local\Temp\solr-8.11.2\server’ is denied.
Resolution:
I wasn’t running at the setup.exe in Admin mode. Ran in Admin mode (restarted the machine just in case) fixed the issue.
Error # 2: Unable to create core index
Error CREATEing SolrCore Unable to create core [wc10.3.xm.local_core_index] Caused by: Can’t find resource ‘solrconfig.xml’ in the classpath or ‘C:\Solr\Solr.8.11.2solr-8.11.2\server\solr\sc10.3.xm.local_core_index’
Resolution:
Do not use the same port used for the earlier installation. For some reason, it doesn’t work. Always use the new port and new Solr instance name.
Now that we installed Sitecore 10.3 XM, I’ll be installing Sitecore Headless Rendering (previously known as the JSS module) in my next blog post.
The following ports needs to be available for containers
The following ports need to be available for running the Docker instance. Make sure you are using stopping the services so it’s available for Docker to consume.
Note: Always use iisreset /stop in the command line rather than stopping it in IIS.
To check the port availability, run the following in PowerShell. It shouldn’t return any process.
netstat -ano | findStr 127.0.0.1:443
netstat -ano | findStr 8079
netstat -ano | findStr 8984
netstat -ano | findStr 14330
Installation:
Extract the file zip file downloaded into Sitecore_10.2(or any folder name).
2. Execute this command to set the execution policy unrestricted.
3. Navigate to XP1 folder (Sitecore_10.2\SitecoreContainerDeployment.10.2.0.006766.683\compose\ltsc2019\xp1) in PowerShell and run compose-init.ps1 script.
.\compose-init.ps1 -LicenseXmlPath <License Path>
Note: I’m installing XP1, If you want XP0, navigate to XP0 folder and follow the same exact steps.
4. Run docker-compose pull
docker-compose pull
5. Run docker-compose up (It takes some time, you can get a coffee!)
docker-compose up –d
Once it’s done, let’s bring in CM instance –
https://xp1cm.localhost/sitecore
Login as adminusing ‘Password12345‘ password (not b though)
It’s so cool see the new desktop view! Cool work Sitecore!
It’s time for CD instance –
https://xp1cd.localhost/
Errors and Resolutions:
If you get unhealthyfor any nodes, don’t worry. It’s very common, I get this most times.
After you install the tools, restart your machine.
SameSite cookies and custom domains:
The commonly-used browsers such as Chrome and Safari are changing how the browsers interpret the SameSite cookie. After the change takes effect, Horizon will only work if the Sitecore Horizon host instance, the Sitecore identity instance, and the Sitecore CM instance belong to the same site.
Download Horizon 10 from here. I downloaded the on-premises deployment.
Extract the zip file and open InstallHorizon.ps1
Fill out the below parameters –
Run the InstallHorizon.ps1 in Adminstrator mode.
Once the installation is done (only takes 2 to 3 minutes), you will see a new Icon in Sitecore XP.
Clicking the Icon opens Horizon (yes, it’s separate IIS site) in a new tab and you can explore the new features!
Post Installation
To use the alignment and indentation features in the rich text editor in Horizon, make sure to add the below styles to your default style sheet (like default.css in your project).
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 SXAif 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
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.
Ensure Sitecore Identity is installed. For example, if your Sitecore CMS instance has the address https://cmdomain.com, then install Sitecore identity with the address identity.cmdomain.com
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.