Wednesday 30 December 2020

Create Sitecore bulk items from list

There are scenarios where we have to create item list in Sitecore - For example: Countries, States, Products or any dropdown item list.


Prerequisites


Sitecore PowerShell Extension must be installed.

List of items, for reference sharing list click to download CountryList, USStates, IndiaStates or any custom file.

Download script CreateBulkItem.ps1


Demo Time


Create a Sitecore item at below path 

/sitecore/system/Modules/PowerShell/Script Library/SPE/Tools/Package Generator/Content Editor/Context Menu/Packaging

by duplicating existing script item and paste CreateBulkItem.ps1 as below (update list text path in script)


Create Sitecore bulk items from list


Execution Steps

Now right click on the item/folder, where wanted to create item list as per screenshot
Name and Value field's must have default value set as $name in template's standard value


sitecore-bulk-item-step

sitecore-bulk-item-inputs

sitecore-bulk-item-success






bulk-item-list



Note: We can do this activity for different field values using json item list file, we only have to update PowerShell script and Sitecore steps will remains same .


Save your time, Hope this help.


Saturday 26 December 2020

ERROR: failed to register layer rename Access is denied

During execution of docker-compose, there are chances to get below issue as

C:\ProgramData\Docker\image\windowsfilter\layerdb\tmp\write-set-547194937 

C:\ProgramData\Docker\image\windowsfilter\layerdb\sha256\315e8c08db9b1b7e769ea42ea3ac985e1f8613472735b9a706145d53348f8d26: 

Access is denied


To resolve this issue, we have to make sure all mentioned ports are unique in docker-compose.yml by running below command.


If there is no output entries came for specific port - then we are good, else will have to change port number.

Please run below command in PowerShell as admin

netstat -aon | findstr 8090


Hope this help.

Container is unhealthy docker

During execution of docker-compose, there may be chance of getting that container is unhealthy.

Let's say

ERROR: for traefik  Container "d96f2d2804ef" is unhealthy.


To know exact Issue behind this issue and about status, run below command in PowerShell by pasting above container id

docker inspect --format "{{json .State.Health }}" d96f2d2804ef

Will be output in json exact error details.

To know more about issue run another command as

docker exec -it d96 bash (first 3 character of above issued container)



Hope this will help

Cannot start service cm: container is marked for removal and cannot be started

During Sitecore instance setup with docker-compose command, sometimes you may face below issue

ERROR: Cannot start service cm: container is marked for removal and cannot be started

or 

ERROR: Cannot start service mssql encountered an error during hcsshim sitecore docker

or

ERROR: Cannot start service solr encountered an error during hcsshim::System::Start: failure in a Windows system call: The virtual machine or container exited unexpectedly.


To resolve above issues, please follow below steps

Try below commands as PowerShell script(admin mode)

docker-compose down

docker-compose up -d


If issue not resolved then please try below approach


copy container id, for which facing issue then run below commands in PowerShell as admin

net stop docker

now manually delete Folder with matched container id from C:\Programdata\docker\containers

net start docker



Hope this help.

Sitecore 10 update 1 installation using SIF

In previous article, we did setup Sitecore 10 update 1 instance using docker

Now in this article will explain alternate way to setup Sitecore 10.0.1 instance using SIF



Pre-requisites

Click here Packages for XP Single download and unzip (at Let's say D:\Sitecore101SIF)

Paste license.xml file at D:\Sitecore101SIF


Installation

Open PowerShell as admin and execute below commands in sequence

cd D:\Sitecore101SIF
Install-Module SitecoreInstallFramework  [ensure version is  2.3.0]
Install-SitecoreConfiguration -Path .\Prerequisites.json

below solr command is optional if solr 8.4.0 already working as https
Install-SitecoreConfiguration -Path Solr-SingleDeveloper.json

Update parameter values in XP0-SingleDeveloper.ps1
.\XP0-SingleDeveloper.ps1

That's it.


Demo Time






Friday 25 December 2020

Sitecore 10 update 1 Installation using docker

Recently Sitecore has released latest version 10.0.1 with new updates and improvements.

In this article, going to setup an Sitecore instance using docker.

sitecore-10-update-1


Let's start with Pre-requisites


Pre-requisites

Docker must be installed, running and Switched to Windows Container mode

docker-desktop-windows




Download Container Deployment Package from below link and unzip (at Lets say D:\SitecoreDocker101)

https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/100/Sitecore_Experience_Platform_100_Update1.aspx

sitecore-docker-container


download init.ps1 and paste at D:\SitecoreDocker101\ltsc2019\xp0

run cmd (admin) and trigger iisreset /stop
if any port from docker-compose.yml are is use (
can check by netstat -aon | findstr <portNo> from PowerShell)
then stop that service to avoid any interrupt during installation.


Installation Steps


Open PowerShell as admin and run below commands in sequence

  cd D:\SitecoreDocker101\ltsc2019\xp0

  .\init.ps1  (will ask for instance name, sql password, sitecore admin password and license path)

  docker-compose up -d


Demo

Open docker desktop dashboard view, will see Sitecore-xp0 up and running.

from PowerShell, run below commands

  docker ps (To get container ids for images)

  docker exec -it <container id> ipconfig  (replace with container id of cm server)

copy IP address, and run on chrome

sitecore-10-update-1

Common Issues:

http://succorpoints.blogspot.com/2020/12/error-failed-to-register-layer-rename.html

http://succorpoints.blogspot.com/2020/12/not-able-to-find-network-sitecore.html

http://succorpoints.blogspot.com/2020/12/cannot-start-service-cm-container-is.html

http://succorpoints.blogspot.com/2020/12/container-is-unhealthy-docker.html

Thursday 24 December 2020

not able to find network sitecore-xp0_default Sitecore docker

may be getting this issue while setting up Sitecore instance using docker. To fix this issue

please run below command on powershell as admin in sequence


docker-compose stop

docker-compose down

iisreset

docker-compose up -d


with this new network container id will be generated.

Hope this will help.

Friday 18 December 2020

There is no action to display Sitecore Form Issue

While working with Sitecore forms, may be facing below issue - on click of form submit action button
as attached image

there-is-no-action-to-display-sitecore



Error Message: There is no action to display.


Possible Cause: It may be because of caching issue.

Fix: Try to resolve this issue, either close the browser and clean history and check if resolved or open sitecore form explorer CMS view in Incognito(private) mode.

Hope this will help and save your time.

Friday 4 December 2020

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Sitecore

Facing an issue that after setting up Fresh Sitecore Instance, not able to access local instance.
getting issue as below




and Config error as 

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".


To resolve this issue,

Please update below setting as per screenshot

  1. Windows search -  "Turn Windows Features on or off"

  2. Expand ASP.NET 4.5 advanced services > WCF section

  3. Check HTTP Activation.

  4. You'll be asked to restart the system.




Hope this will help.