tag:blogger.com,1999:blog-58469959797717846052024-03-19T13:01:27.979+05:30BugDebugZoneTutorials, Tips, Tricks, Codes related to ASP.NET, .NET , C# , SQL SERVER , WCF, SITECORE, MVC, jQuery and many more !Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.comBlogger99125tag:blogger.com,1999:blog-5846995979771784605.post-82304082177831881342020-09-07T13:51:00.000+05:302020-09-07T13:51:10.239+05:30Install Sitecore XP 10 to developer workstation using Sitecore containers with Docker Compose<p>With the launch of Sitecore 10, Sitecore is now officially providing full support for deploying a solution in a containerized environment for the following products:</p><p></p><ul style="text-align: left;"><li>Sitecore Experience Platform 10.0 Initial Release</li><li>Sitecore Experience Accelerator 10.0.0</li><li>Sitecore JavaScript Services 14.0</li><li>Sitecore Experience Commerce 10.0 Initial Release </li></ul><p>Refer to the <a href="https://containers.doc.sitecore.com/" rel="nofollow" target="_blank">official documentation</a> to know more about Sitecore containers. In this blog, I’ll explain how to Install Sitecore XP 10 XP0 topology to developer workstation using Sitecore containers with Docker Compose.</p><h1 style="text-align: left;">Prerequisites</h1><div><ul style="text-align: left;"><li>Windows 10 Professional or Enterprise version 1809 (2019 LTSC) or later. For enabling process isolation, version 1909 is recommended.<br /><div style="text-align: center;">OR</div>Windows Server 1809 or later</li><li><a href="https://docs.docker.com/docker-for-windows/install/" rel="nofollow" target="_blank">Download and install Docker Desktop for Windows </a></li><li><a href="https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/hyper-v-requirements" rel="nofollow" target="_blank">Hyper-V</a> should be enabled.</li><li>32 GB RAM is recommended.</li><li>A quad-core or higher CPU.</li><li>Approximately 25GB of free disk space for Sitecore container images. SSD storage is highly recommended.</li><li><a href="https://dev.sitecore.net/~/media/264A706E501D4611B98E01BE1D8F3E94.ashx" rel="nofollow" target="_blank">Sitecore 10 Container Deployment Package</a><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-JrR_iHPXPpQ/X1XW6USwyTI/AAAAAAAAAy4/0iO3OsqbYI4zCW_mvXDGyX9LEDQv5ZlUwCLcBGAsYHQ/s1509/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="521" data-original-width="1509" src="https://1.bp.blogspot.com/-JrR_iHPXPpQ/X1XW6USwyTI/AAAAAAAAAy4/0iO3OsqbYI4zCW_mvXDGyX9LEDQv5ZlUwCLcBGAsYHQ/s16000/1.png" /></a></div><br /></li><li>Please ensure that the below ports are available and not in use by other applications.
<style type="text/css">
table.tableizer-table {
border: 1px solid #CCC;
}
.tableizer-table td {
padding: 4px !important;
margin: 3px;
border: 1px solid #ccc;
}
.tableizer-table th {
background-color: #33A5D7;
color: #FFF;
font-weight: bold;
padding: 4px !important;
}
</style><br />
<table class="tableizer-table">
<tbody>
<tr class="tableizer-firstrow"><th>Required Port</th><th>Role</th><th>Description</th></tr>
<tr><td>443</td><td>Traefik</td><td>HTTPS proxy</td></tr>
<tr><td>8079</td><td>Traefik</td><td>Traefik dashboard</td></tr>
<tr><td>8080</td><td>Traefik</td><td>HTTP proxy</td></tr>
<tr><td>8984</td><td>Solr</td><td>Solr API and dashboard</td></tr>
<tr><td>14330</td><td>SQL</td><td>SQL Server</td></tr>
</tbody></table>
</li><li>Sitecore license file</li></ul></div>
<h1 style="text-align: left;">Deploy a Sitecore XP developer workstation</h1><div><ul style="text-align: left;"><li>Run PowerShell as administrator and stop IIS using the below command. This will ensure that all required ports are available and not in use by another process.
<pre>iisreset /stop</pre>
</li><li>Switch to Windows containers mode in Docker for windows.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-9T3zjTgx-a8/X1XagqJhAdI/AAAAAAAAAzQ/cT5fPjCnKWUL7ilkmrRv34d-V76U8-LxACLcBGAsYHQ/s437/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="405" data-original-width="437" src="https://1.bp.blogspot.com/-9T3zjTgx-a8/X1XagqJhAdI/AAAAAAAAAzQ/cT5fPjCnKWUL7ilkmrRv34d-V76U8-LxACLcBGAsYHQ/s16000/2.png" /></a><br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-stsTieeZpII/X1XaniFuZdI/AAAAAAAAAzU/z6F2adWDqaIILwdE9vhElV4a_iWB8zm-gCLcBGAsYHQ/s346/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="286" src="https://1.bp.blogspot.com/-stsTieeZpII/X1XaniFuZdI/AAAAAAAAAzU/z6F2adWDqaIILwdE9vhElV4a_iWB8zm-gCLcBGAsYHQ/s16000/3.png" /></a></div><br /></li><li>Download and extract the Sitecore Container Deployment Package from the Sitecore Developer Portal and store it on your local directory. Navigate to <b>sitecore-xp0</b> docker compose folder for xp0 topology. In my local machine, extracted folder path is <b>C:\sitecore\10\SitecoreContainerDeployment 10.0.0 rev. 004346-027\1909\sitecore-xp0<br /><br /></b><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-i3aCWWmKUEM/X1Xa29ZDuYI/AAAAAAAAAzc/52ID0DnS86gIVwGCIIm-f-d2W3Wf-h1NgCLcBGAsYHQ/s1074/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="274" data-original-width="1074" src="https://1.bp.blogspot.com/-i3aCWWmKUEM/X1Xa29ZDuYI/AAAAAAAAAzc/52ID0DnS86gIVwGCIIm-f-d2W3Wf-h1NgCLcBGAsYHQ/s16000/4.png" /></a></div></li><li>Download helper <a href="https://github.com/Sitecore/docker-examples/blob/develop/getting-started/init.ps1" rel="nofollow" target="_blank">PowerShell script</a> <b>init.ps1</b> from Sitecore docker-examples repository. This script will automate few manual steps like encoding the Sitecore license file into base64 string.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-LId3udajJxY/X1Xh-TpoTZI/AAAAAAAAAz4/sjj3KmUFXpgCqocracNtdZxKl12_iEL2ACLcBGAsYHQ/s1738/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="771" data-original-width="1738" src="https://1.bp.blogspot.com/-LId3udajJxY/X1Xh-TpoTZI/AAAAAAAAAz4/sjj3KmUFXpgCqocracNtdZxKl12_iEL2ACLcBGAsYHQ/s16000/5.png" /></a></div></li><li>Move <b>init.ps1</b> script to <b>sitecore-xp0</b> topology folder.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Yqbu-Ir2cz0/X1Xirpl27uI/AAAAAAAAA0A/TjtZqS46XtUSPx1gJ3UfA_q6sSvBdqHcwCLcBGAsYHQ/s1042/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="289" data-original-width="1042" src="https://1.bp.blogspot.com/-Yqbu-Ir2cz0/X1Xirpl27uI/AAAAAAAAA0A/TjtZqS46XtUSPx1gJ3UfA_q6sSvBdqHcwCLcBGAsYHQ/s16000/6.png" /></a></div></li><li>Open environment <b>.env</b> file. You will observe a few unassigned variables. Every variable is explained in detail in the Installation Guide for a Developer Workstation with Containers.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-hMSkRWqU4D8/X1XjAwiFR4I/AAAAAAAAA0I/YaNCrYy0NegUyFjPG34KnDLE_5u8UCFoQCLcBGAsYHQ/s859/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="454" data-original-width="859" src="https://1.bp.blogspot.com/-hMSkRWqU4D8/X1XjAwiFR4I/AAAAAAAAA0I/YaNCrYy0NegUyFjPG34KnDLE_5u8UCFoQCLcBGAsYHQ/s16000/7.png" /></a></div></li><li>We are not going to populate these variables manually but will use init.ps1 script to initialize these variables. You may update <b>CM_HOST</b> and <b>ID_HOST</b> variables as per your requirement.</li><li>Open <b>init.ps1</b> file and change <b>SitecoreAdminPassword</b>, <b>SqlSaPassword, </b>and other parameters as per your need. I’ve not made any changes and kept default values for this installation.</li><li>Switch back to the Powershell window and navigate to <b>sitecore-xp0</b> folder. Run the below command to populate the <b>.env</b> file. Make sure to provide the correct path of the Sitecore license file.
<pre>.\init.ps1 -LicenseXmlPath C:\sitecore\license.xml
</pre><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-jBtWSpovKIg/X1XkJejP42I/AAAAAAAAA0U/fRRRB0-k00QLuDybLY-3PBkzrGZsQevVACLcBGAsYHQ/s1173/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="183" data-original-width="1173" src="https://1.bp.blogspot.com/-jBtWSpovKIg/X1XkJejP42I/AAAAAAAAA0U/fRRRB0-k00QLuDybLY-3PBkzrGZsQevVACLcBGAsYHQ/s16000/8.png" /></a></div>
</li><li>The above command will install the <b>SitecoreDockerTools </b>module and populate the environment file. Open the .env file and verify that all the variables are successfully populated.</li><li>Run the below command to start docker-compose in detached mode.
<pre>docker-compose up -d</pre>
</li><li>This command will take some time in completion (based on your internet speed and hardware performance). This command will do a few things:
<ul>
<li>Download all required images from the Sitecore Container Registry</li>
<li>Create a default network to use</li>
<li>Create a container for each configured service, and</li>
<li>Start the containers with their configured entry points</li>
</ul>
</li><li>After successful installation, you will now have a <b>Sitecore Experience Platform - Single (XP0)</b> instance up and running.</li><li>Verify installation by using below endpoints
<ul>
<li>Sitecore Content Management (cm): https://xp0cm.localhost</li>
<li>Sitecore Identity Server (id): https://xp0id.localhost</li>
<li>Sitecore xConnect Server (xconnect): http://localhost:8081</li>
<li>Apache Solr (solr): http://localhost:8984</li>
<li>Microsoft SQL Server (mssql): localhost,14330</li><li>Traefik: http://localhost:8079</li>
</ul>
</li></ul></div>
<h1 style="text-align: left;">Cleanup the workstation</h1><div>You can stop or completely remove a workstation environment by running Docker Compose commands.</div><div><ul style="text-align: left;">
<li>To stop a Docker Compose environment without removing its contents:
<pre>docker-compose stop</pre>
</li>
<li>To resume a previously stopped Docker Compose environment:
<pre>docker-compose start</pre>
</li>
<li>To remove a Docker Compose environment and all the non-mounted volumes:
<pre>docker-compose down</pre>
</li></ul></div>
<h1 style="text-align: left;">Installation issues</h1><div>You may encounter below issues when installing Sitecore XP10 using Sitecore containers</div><div><ul style="text-align: left;"><li>PackageManagement\Install-Package : The following commands are already available on this system:'Remove-HostsEntry'. This module 'SitecoreDockerTools' may override the existing commands.</li><li>Importing SitecoreDockerTools...<br />Import-Module : The specified module 'SitecoreDockerTools' with version '10.0.5' was not loaded because no valid module file was found in any module directory.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-qoS-Vl2ET5U/X1XpnPHN2SI/AAAAAAAAA0s/1K31H-WT84IIXxo3WxmsGTru76WLUYLcACLcBGAsYHQ/s1900/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="446" data-original-width="1900" src="https://1.bp.blogspot.com/-qoS-Vl2ET5U/X1XpnPHN2SI/AAAAAAAAA0s/1K31H-WT84IIXxo3WxmsGTru76WLUYLcACLcBGAsYHQ/s16000/9.png" /></a></div>
<b><u>Solution</u>:</b> open <b>init.ps1</b> and use <b>-allowclobber</b> parameter in <b>Install-Module SitecoreDockerTools</b> command.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-0uQ7_pDzdO8/X1Xp-sALRtI/AAAAAAAAA00/rrlAztVUqM4oQicbWldZGPTTS3B944e9ACLcBGAsYHQ/s1416/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="250" data-original-width="1416" src="https://1.bp.blogspot.com/-0uQ7_pDzdO8/X1Xp-sALRtI/AAAAAAAAA00/rrlAztVUqM4oQicbWldZGPTTS3B944e9ACLcBGAsYHQ/s16000/10.png" /></a></div></li><li>ERROR a Windows version 10.0.18363-based image is incompatible with a 10.0.18362 host<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-mABt6Zjo1tQ/X1XqcE4NS6I/AAAAAAAAA08/DYxKiWFg_z4ALO8-VQwe6KZCxnF2rpFDgCLcBGAsYHQ/s776/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="114" data-original-width="776" src="https://1.bp.blogspot.com/-mABt6Zjo1tQ/X1XqcE4NS6I/AAAAAAAAA08/DYxKiWFg_z4ALO8-VQwe6KZCxnF2rpFDgCLcBGAsYHQ/s16000/11.png" /></a></div><b><u>Solution</u>: </b>Check the prerequisites section. Make sure that you are working on Windows 10 Professional or Enterprise version 1909 or higher.</li><li>ERROR: for sitecore-xp0_traefik_1 Cannot start service traefik: failed to create endpoint sitecore-xp0_traefik_1 on network sitecore-xp0_default: failed during hnsCallRawResponse: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20)<br /><b><u>Solution</u>: </b>Check that all the required ports are available and not in use by another process. Run <b>iisreset /stop</b> command to stop IIS.</li></ul></div>
<h1 style="text-align: left;">References</h1><div><ul style="text-align: left;"><li><a href="http://containers.doc.sitecore.com/docs/intro" rel="nofollow" target="_blank">Sitecore Containers Documentation</a></li><li>Sitecore installation Guide for Developer Workstation with Containers</li><li><a href="https://github.com/Sitecore/docker-examples" rel="nofollow" target="_blank">Sitecore docker-examples GitHub repository</a></li></ul></div>
Comments and suggestions are most welcome. Happy coding! Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com1Gurugram, Haryana, India28.4594965 77.02663830.14926266382115472 41.8703883 56.769730336178846 112.1828883tag:blogger.com,1999:blog-5846995979771784605.post-91166449450911404152018-07-22T12:36:00.000+05:302018-12-08T14:35:02.488+05:30SXA : Disabling asset optimizer not working <div dir="ltr" style="text-align: left;" trbidi="on">
I’ve previously blogged about disabling <a href="https://www.bugdebugzone.com/2018/07/sitecore-sxa-disable-asset-optimizer.html" target="_blank">Sitecore SXA asset optimizer</a>. Recently, I’ve stumbled upon a situation where we have disabled SXA asset optimizer for SXA site in non-production environment but CSS styles and javascripts are still getting rendered in minified version - <b>optimized.min.js</b> and <b>optimized.min.css</b>.<br />
<br />
I’ve made sure that asset optimizer was disabled for local SXA site. For troubleshooting, I’ve also disabled asset optimizer at global level but I have no luck. I’ve verified value of <b>XA.Foundation.Theming.StylesConfigurationId</b> and <b>XA.Foundation.Theming.ScriptsConfigurationId</b> settings and these settings were having correct value assigned.<br />
<br />
<b><u>XA.Foundation.Theming.StylesConfigurationId</u> : </b>The ID of the item that stores the configuration for style asset optimization. <br />
<b>(/sitecore/system/Settings/Foundation/Experience Accelerator/Theming/Optimiser/Styles</b>)
<br />
<pre><setting name="XA.Foundation.Theming.StylesConfigurationId" value="{B3B10434-DACE-483E-B375-49C6D215723D}" />
</pre>
<br />
<b><u>XA.Foundation.Theming.ScriptsConfigurationId</u> : </b>The ID of the item that stores the configuration for script asset optimization.<br />
(<b>/sitecore/system/Settings/Foundation/Experience Accelerator/Theming/Optimiser/Scripts</b>)
<br />
<pre><setting name="XA.Foundation.Theming.ScriptsConfigurationId" value="{4110D103-861E-464F-A258-130A8FCF4C61}" />
</pre>
Then I’ve peeked into source code of <b>Sitecore.XA.Foundation.Theming.dll</b> and checked implementation of <b>AssetConfigurationReader</b>.<br />
<pre>public virtual AssetConfiguration ReadConfiguration()
{
AssetConfiguration assetConfiguration = new AssetConfiguration();
<span style="background-color: yellow;">Item designItem = ServiceLocator.ServiceProvider.GetService<IPresentationContext>().DesignItem;</span>
if (this.RequestAssetsOptimizationDisabled)
return new AssetConfiguration()
{
ScriptsMode = AssetServiceMode.Disabled,
StylesMode = AssetServiceMode.Disabled,
RequestAssetsOptimizationDisabled = true
};
<span style="background-color: yellow;">if (designItem == null)</span>
<span style="background-color: yellow;">return assetConfiguration;</span>
bool? tristate1 = this.ParseTristate(designItem.Parent[Sitecore.XA.Foundation.Theming.Templates._Optimizable.Fields.StylesOptimisingEnabled]);
bool? tristate2 = this.ParseTristate(designItem.Parent[Sitecore.XA.Foundation.Theming.Templates._Optimizable.Fields.ScriptsOptimisingEnabled]);
assetConfiguration.ScriptsMode = this.GetConfiguration(designItem.Database.GetItem(ID.Parse(Settings.GetSetting("XA.Foundation.Theming.ScriptsConfigurationId"))));
assetConfiguration.StylesMode = this.GetConfiguration(designItem.Database.GetItem(ID.Parse(Settings.GetSetting("XA.Foundation.Theming.StylesConfigurationId"))));
if (tristate1.HasValue)
assetConfiguration.StylesMode = !tristate1.Value ? AssetServiceMode.Disabled : AssetServiceMode.ConcatenateAndMinify;
if (tristate2.HasValue)
assetConfiguration.ScriptsMode = !tristate2.Value ? AssetServiceMode.Disabled : AssetServiceMode.ConcatenateAndMinify;
return assetConfiguration;
}
</pre>
This code has pointed me to right direction. It seems that <b>designItem </b>was set to <b>null</b>. I’ve opened content editor and navigated to context page item in content tree. In the <b>Designing </b>section, <b>Page Design</b> field value was empty.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-ZmOFxkJSxCA/W1QsWPZLx8I/AAAAAAAAAtQ/pl1bcOmhwssQN6toIoYP8Lzpw67vHnD8gCLcBGAs/s1600/1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="188" data-original-width="1243" src="https://2.bp.blogspot.com/-ZmOFxkJSxCA/W1QsWPZLx8I/AAAAAAAAAtQ/pl1bcOmhwssQN6toIoYP8Lzpw67vHnD8gCLcBGAs/s1600/1.bmp" /></a></div>
<br />
I’ve selected appropriate Page Design, saved my changes and published the sitecore item. Voila! Asset optimizer gets disabled and uncompressed CSS styles and javascripts start getting render. Comments and suggestions are most welcome. Happy coding!
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com1Auckland, New Zealand-36.8484597 174.76333150000005-37.2549887 174.11788450000006 -36.4419307 175.40877850000004tag:blogger.com,1999:blog-5846995979771784605.post-44429024123304724132018-07-22T07:59:00.001+05:302018-07-22T07:59:27.776+05:30Sitecore SXA : Disable Asset Optimizer<div dir="ltr" style="text-align: left;" trbidi="on">
<b>Asset Optimizer</b> is a good feature of Sitecore SXA as it improves the end user experience by minifying CSS styles and javascripts thus reducing the amount of data that needs to be transferred over HTTP request. If Asset Optimizer is enabled, then Sitecore will automatically generate <b>optimized.min.js</b> and <b>optimized.min.css</b>. It is recommended to enable Asset Optimizer for production environment but sometimes you need to disable Asset Optimizer in non-prod environment (DEV, QA or STAGING) to troubleshoot or debug website scripts and css styles. In this blog post, I am doing to show few ways to disable Sitecore SXA Asset Optimizer:<br />
<h3 style="text-align: left;">
Disable the Asset Optimizer globally</h3>
<div style="text-align: left;">
You can disable Asset Optimizer at global level for all SXA sites. In the Sitecore Content Editor, navigate to <b>/sitecore/system/Settings/Foundation/Experience Accelerator/Theming/Optimiser</b> and for both <b>Scripts</b> and <b>Styles</b> sitecore items select <b>Mode</b> as <b>Disabled</b> to disable Asset Optimizer. Save and publish your changes.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-GfbZHvEMdJY/W1PqzhT10vI/AAAAAAAAAs8/ga3Lxv-J7swJhHGoDmprNpmS1t9ibj2uACLcBGAs/s1600/1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="1600" src="https://1.bp.blogspot.com/-GfbZHvEMdJY/W1PqzhT10vI/AAAAAAAAAs8/ga3Lxv-J7swJhHGoDmprNpmS1t9ibj2uACLcBGAs/s1600/1.bmp" /></a></div>
</div>
<h3 style="text-align: left;">
Disable asset optimizer for a specific SXA site</h3>
<div style="text-align: left;">
You can disable Asset Optimizer for a specific SXA site. In the Content Editor, navigate to <b>/sitecore/content/…/SXA_SITE_NAME/Presentation/Page Designs</b>. In the <b>Asset Optimization</b> section, in the <b>Styles Optimizing Enabled</b> and <b>Scripts Optimizing Enabled</b> fields set field value as <b>NO</b> to always disable optimization for SXA site.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-BcYqg84Qh6o/W1Pq58vUzNI/AAAAAAAAAtA/K89InfwKEvgJWqZOf8CzediycX38DuFwQCLcBGAs/s1600/2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="396" data-original-width="1600" src="https://1.bp.blogspot.com/-BcYqg84Qh6o/W1Pq58vUzNI/AAAAAAAAAtA/K89InfwKEvgJWqZOf8CzediycX38DuFwQCLcBGAs/s1600/2.bmp" /></a></div>
</div>
<h3 style="text-align: left;">
Disable asset optimizer temporarily for a specific sitecore page</h3>
<div style="text-align: left;">
Even with the Asset Optimizer enabled, you can temporarily disable the assets optimisation on any Sitecore page. All you need to do is pass <b>aodisabled=1</b> as query string parameter to your request url. For example: <b>https://local.mysxaplayground.net/viewlocations?<span style="background-color: yellow;">aodisabled=1</span></b></div>
<div class="message_box announce">
It is best practice to disable the Asset Optimizer in non-production environments and to enable it in production environments.</div>
Comments and suggestions are most welcome. Happy coding!
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com1Auckland, New Zealand-36.8484597 174.76333150000005-37.2549887 174.11788450000006 -36.4419307 175.40877850000004tag:blogger.com,1999:blog-5846995979771784605.post-89439048509385229592018-06-03T17:23:00.000+05:302018-06-03T17:33:14.009+05:30Sitecore experience commerce 9 – No Sitecore Commerce Engine log files?<div dir="ltr" style="text-align: left;" trbidi="on">
Recently while working with Sitecore experience commerce 9, I’d encountered few issues. To resolve those issue, I need to check logs. While troubleshooting I have found that there were no Sitecore commerce engine log files in log folder. I’d recycle application pool and even restarted IIS but no luck. I’d started troubleshooting with <b>config. json</b> file located at <b>C:\inetpub\wwwroot\CommerceAuthoring_Sc9\wwwroot\ </b>and Bingo! I’d hit the nail right on the head. I’ve compared config.json with default Sitecore.Commerce.Engine config.json file and found out that logging configuration section was missing in config.json. I’ve added below configuration in config.json, given write access on log folder to <b>NetworkService </b>account and application pool identity user (<b>CSFndRuntimeUser</b>), restarted IIS and log files started updating in log folder. I’ve done similar steps for <b>CommerceMinions</b>, <b>CommerceOps</b> and <b>CommerceShops </b>websites.
<br />
<pre>"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Information",
"System": "Warning",
"Microsoft": "Warning"
},
"ApplicationInsightsLoggingEnabled": false
},
"Serilog": {
"Using": ["Serilog.Sinks.Literate", "Serilog.Sinks.File"],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Information",
"System": "Information"
}
},
"FileSizeLimitBytes": 100000000
}</pre>
Comments and suggestions are most welcome. Happy coding! </div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.4594965 77.026638300000059 28.4594965 77.026638300000059tag:blogger.com,1999:blog-5846995979771784605.post-16624159708485058312018-06-03T16:32:00.000+05:302018-06-03T16:32:04.710+05:30Sitecore Experience Commerce 9 installation error: The target principal name is incorrect<div dir="ltr" style="text-align: left;" trbidi="on">
Recently I have stumbled upon in a situation where Sitecore Experience Commerce 9 update 1 powershell installation script didn’t execute successfully and gave the following error:
<br />
<pre>Importing DACPAC C:\Sitecore\installscCommerce9u1\deploy\Sitecore.Commerce.Engine.SDK.2.1.10\Sitecore.Commerce.Engine.DB.dacpac
Using SQL Server 140 to import DACPAC
TerminatingError(DeployDacpac): "Exception calling "Deploy" with "3" argument(s): "Could not deploy package.""
Initializing deployment (Start)
The target principal name is incorrect. Cannot generate SSPI context.
System.Management.Automation.MethodInvocationException: Exception calling "Deploy" with "3" argument(s): "Could not deploy package." ---> Microsoft.SqlServer.Dac.DacServicesException: Could not deploy package. ---> Microsoft.Data.Tools.Schema.Sql.Deployment.DeploymentFailedException: Unable to connect to master or target server 'SitecoreCommerce9_Global'. You must have a user with the same password in master or target server 'SitecoreCommerce9_Global'.
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentEndpointServer.OnInit(ErrorManager errors, String targetDBName)
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment..ctor(SqlDeploymentConstructor constructor)
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentConstructor.ConstructServiceImplementation()
at Microsoft.SqlServer.Dac.DacServices.CreatePackageToDatabaseDeployment(SqlConnectionFactory connectionFactory, IPackageSource packageSource, String targetDatabaseName, DacDeployOptions options, ErrorManager errorManager)
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass3.<>c__DisplayClass5.<CreatePlanInitializationOperation>b__1()
at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action)
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass3.<CreatePlanInitializationOperation>b__0(Object operation, CancellationToken token)
at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken, DacLoggingContext loggingContext, Action`3 reportPlanOperation, Boolean executePlan)
at Microsoft.SqlServer.Dac.DacServices.Deploy(DacPackage package, String targetDatabaseName, Boolean upgradeExisting, DacDeployOptions options, Nullable`1 cancellationToken)
at CallSite.Target(Closure , CallSite , Object , Object , Object , Boolean )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
<span style="background-color: yellow;">The target principal name is incorrect. Cannot generate SSPI context.</span>
</pre>
I was able to resolve this issue by making below changes in powershell script (Deploy-Sitecore-Commerce.ps1)<br />
<ul style="text-align: left;">
<li>Set value as <b>CommerceServicesDbServer = "."</b> instead of <b>CommerceServicesDbServer = "./"</b></li>
<li>Set value as <b>SitecoreDbServer = "."</b> instead of <b>SitecoreDbServer = "./"</b></li>
</ul>
You may have to update above DbServer values as per your SQL Server configuration. Comments and suggestions are most welcome. Happy coding! <br /><br /></div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com1Gurugram, Haryana, India28.4594965 77.02663830000005928.4594965 77.026638300000059 28.4594965 77.026638300000059tag:blogger.com,1999:blog-5846995979771784605.post-27622592039895747222018-06-03T14:39:00.000+05:302018-06-03T14:39:01.701+05:30Getting started with Sitecore Rocks<div dir="ltr" style="text-align: left;" trbidi="on">
This year, I had received opportunity to present at Sitecore NCR user group. I’d presented on extension for Visual Studio - Sitecore Rocks. Sitecore Rocks makes Sitecore developers happy. Sitecore Rocks is free, and it is useful for many other Sitecore development tasks. Here is the recording and slides of this session:
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/hPEKGesrerg?rel=0" width="560"></iframe>
<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="485" marginheight="0" marginwidth="0" scrolling="no" src="//www.slideshare.net/slideshow/embed_code/key/A6nURpGNxx0a0l" style="border-width: 1px; border: 1px solid #ccc; margin-bottom: 5px; max-width: 100%;" width="595"> </iframe> <br />
<div style="margin-bottom: 5px;">
<b> <a href="https://www.slideshare.net/DheerRajpoot/getting-started-with-sitecore-rocks" target="_blank" title="Getting started with Sitecore rocks">Getting started with Sitecore rocks</a> </b> from <b><a href="https://www.slideshare.net/DheerRajpoot" target="_blank">Dheer Rajpoot</a></b>
<br />
<br />
Comments and suggestions are most welcome. Happy coding!
</div>
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com1Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-892213532476307412017-09-17T12:16:00.001+05:302017-09-17T12:16:11.071+05:30WFFM : Customizing export form data to excel functionality<div dir="ltr" style="text-align: left;" trbidi="on">
In previous blog posts, I have explained how to <a href="http://www.bugdebugzone.com/2017/09/wffm-customizing-sql-form-data-provider.html" target="_blank">create custom SQL provider</a> and <a href="http://www.bugdebugzone.com/2017/09/wffm-create-custom-save-to-database.html" target="_blank">custom save to database action</a> to store form data into SQL database. If you’re interested to know the context of the customization, checkout <a href="http://www.bugdebugzone.com/2017/09/wffm-customizing-sql-form-data-provider.html" target="_blank">this blog post</a>. In this blog post, I’ll explain how to customize export form data to excel functionality so that form reports include user’s browser information.<br />
<h3 style="text-align: left;">
Environment Detail</h3>
Sitecore 8.2 update 5 (CMS only mode), Web Forms for Marketers 8.2 rev. 170807<br />
<h3 style="text-align: left;">
Implementation </h3>
I’ve decompiled <b>Sitecore.WFFM.Services.dll</b> assembly to find out the code which invokes export form data to excel functionality.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-meDHa-Dhr7w/Wb4XoVdXkEI/AAAAAAAAAsE/oqsa33VN9KItqR7-t1b8xYeCvHQeRAwoQCLcBGAs/s1600/3.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="609" data-original-width="510" src="https://3.bp.blogspot.com/-meDHa-Dhr7w/Wb4XoVdXkEI/AAAAAAAAAsE/oqsa33VN9KItqR7-t1b8xYeCvHQeRAwoQCLcBGAs/s1600/3.bmp" /></a></div>
It seems that we cannot override few methods inside of <b>Sitecore.WFFM.Services.Pipelines.ExportToExcel.ExportFormDataToExcel</b> class. So I created a duplicate copy of this class and added my custom logic to include user’s browser information into form reports.<br />
<br />
<script src="https://gist.github.com/Dheer-Rajpoot/61677f95e6e1cb06869c6898612ecd78.js"></script>
Add a patch config file to configure custom export to excel functionality:
<br />
<pre><configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<pipelines>
<!--EXPORT TO EXCEL-->
<exportToExcel>
<processor patch:instead="processor[@type='Sitecore.WFFM.Services.Pipelines.ExportToExcel.ExportFormDataToExcel, Sitecore.WFFM.Services']" type="Website.WFFM.Pipelines.CustomExportFormDataToExcel, Website" />
</exportToExcel>
</pipelines>
</sitecore>
</configuration></pre>
That's it! Comments and suggestions are most welcome. Happy coding!
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com2Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-11838090456345959332017-09-17T11:54:00.001+05:302017-09-17T12:24:31.727+05:30WFFM : Create custom Save to Database Action<div dir="ltr" style="text-align: left;" trbidi="on">
In last blog post, I have explained <a href="http://www.bugdebugzone.com/2017/09/wffm-customizing-sql-form-data-provider.html" target="_blank">how to create custom SQL provider</a> to store form data into SQL database. If you’re interested to know the context of the customization, checkout the <a href="http://www.bugdebugzone.com/2017/09/wffm-customizing-sql-form-data-provider.html" target="_blank">last blog post</a>. In this blog post, I’ll explain how to create a custom save to database action.<br />
<h3 style="text-align: left;">
Environment Detail</h3>
Sitecore 8.2 update 5 (CMS only mode), Web Forms for Marketers 8.2 rev. 170807<br />
<h3 style="text-align: left;">
Implementation</h3>
<ol style="text-align: left;">
<li>Create a new <b>SaveToDatabaseAction </b>class and inherit <b>WffmSaveAction </b>class.</li>
<li>Write custom logic to add new <b>FieldData </b>to form field list dynamically while saving form data.
<br /><br />
<script src="https://gist.github.com/Dheer-Rajpoot/465f989c08ab1f3179bb18aa03be8455.js"></script>
</li>
<li>Build the code and deploy assembly in bin folder of your Sitecore instance.</li>
<li>Navigate to Sitecore content tree and create a new <b>Save To Database</b> save action under <b>/sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions</b> node.<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-TPrzYYOnSA0/Wb4UExcnWAI/AAAAAAAAAr0/fy0Vfq95h68-XY4zav2Hc0mE2AD5063CQCLcBGAs/s1600/1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="617" data-original-width="1158" src="https://1.bp.blogspot.com/-TPrzYYOnSA0/Wb4UExcnWAI/AAAAAAAAAr0/fy0Vfq95h68-XY4zav2Hc0mE2AD5063CQCLcBGAs/s1600/1.bmp" /></a></div>
</li>
<li>Add a config patch to specify WFFM connection string.
<pre><configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<settings>
<setting name="WFM.ConnectionString" value="wfm" set:value="wffm" />
</settings>
</sitecore>
</configuration></pre>
</li>
<li>Select the relevant WFFM form and add Save To Database action in Save Actions. <br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-MknBm4coGSY/Wb4UgAFBfPI/AAAAAAAAAr4/FYB-XWEcVwsnXYP5oR2GM2WFQ1KyzjmYACLcBGAs/s1600/2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="763" data-original-width="618" src="https://4.bp.blogspot.com/-MknBm4coGSY/Wb4UgAFBfPI/AAAAAAAAAr4/FYB-XWEcVwsnXYP5oR2GM2WFQ1KyzjmYACLcBGAs/s1600/2.bmp" /></a></div>
</li>
<li> Select the relevant WFFM form and in the <b>Submit </b>section, un-check <b>Save Form Data To Storage</b> checkbox so that form data won’t get saved multiple times into the SQL database.</li>
<li>Publish Sitecore related changes. </li>
</ol>
In next blog post, I’ll explain how to <a href="http://www.bugdebugzone.com/2017/09/wffm-customizing-export-form-data-to.html" target="_blank">customize export form data to excel functionality</a> so that form reports include user’s browser information. Comments and suggestions are most welcome. Happy coding!</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-84624147966240394272017-09-17T11:07:00.001+05:302017-09-17T20:47:07.439+05:30WFFM : Customizing SQL form data provider<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Requirement</h3>
I’ve got a task where I have to save user’s browser information (Browser name and version) into Sitecore WFFM SQL database as part of the every WFFM form submission. Website support team would like to know the user’s browser that is being used for accessing the production site, so that they don't have to request this information while troubleshooting any issues the user has reported via the Feedback/Troubleshooting Contact Us form.<br />
<h3 style="text-align: left;">
Environment Details</h3>
<div style="text-align: left;">
Sitecore 8.2 update 5 (CMS only mode), Web Forms for Marketers 8.2 rev. 170807</div>
<h3 style="text-align: left;">
Implementation</h3>
<div style="text-align: left;">
I’ve decided to customize WFFM save to database functionality and add new <b>FieldData </b>to form field list dynamically while saving form data. This new FieldData will consist user’s browser information (Browser name and version). This implementation can be achieved by below three ways:</div>
<ol style="text-align: left;">
<li><a href="http://www.bugdebugzone.com/2017/09/wffm-customizing-sql-form-data-provider.html" target="_blank">Customizing SQL form data provider</a></li>
<li><a href="http://www.bugdebugzone.com/2017/09/wffm-create-custom-save-to-database.html" target="_blank">Create new save to database action</a></li>
<li>Create a custom field. </li>
</ol>
We have to also <a href="http://www.bugdebugzone.com/2017/09/wffm-customizing-export-form-data-to.html" target="_blank">modify export form data to excel functionality</a> so that form reports include user’s browser information. In this blog post, I’ll explain how to create custom SQL provider to store form data into SQL database.<br />
<h3 style="text-align: left;">
WFFM Configuration</h3>
<div style="text-align: left;">
In the <b>\Website\Data</b> folder of your Sitecore instance, attach the <b>Sitecore_Wffm.mdf</b> database to the SQL Server, and add a connection string with the name “<b>wffm</b>” in the <b>ConnectionStrings.config</b> file, located in the <b>\Website\App_Config</b> folder.</div>
<pre><add name="wffm" connectionString="Data Source=(local);Initial Catalog=instance_name_wffmDB;Integrated Security=False;User ID=sa;Password=12345"</pre>
<h3 style="text-align: left;">
Customizing SQL form data provider</h3>
<ol style="text-align: left;">
<li>Create a new <b>CustomSqlFormsDataProvider </b>class and inherit <b>SqlFormsDataProvider </b>class.</li>
<li>Write custom logic to add new <b>FieldData </b>to form field list dynamically while saving form data.<br /><br />
<script src="https://gist.github.com/Dheer-Rajpoot/e7d74ad715a5cb3af58e4e856037916c.js"></script>
</li>
<li>Add a config patch as below to configure <b>CustomSqlFormsDataProvider</b>.
<pre><configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<wffm>
<analytics>
<formsDataProvider patch:instead="*[@ref='/sitecore/wffm/analytics/analyticsFormsDataProvider']" ref="/sitecore/wffm/analytics/customSqlFormsDataProvider"/>
<customSqlFormsDataProvider type="Website.WFFM.Providers.CustomSqlFormsDataProvider, Website">
<param name="connectionStringName">wffm</param>
<param name="settings" ref="/sitecore/wffm/settings"/>
<param name="connectionProvider" ref="/sitecore/wffm/analytics/connectionProvider"/>
</customSqlFormsDataProvider>
</analytics>
</wffm>
</sitecore>
</configuration></pre>
</li>
<li>Select the relevant WFFM form and in the <b>Submit </b>section, select <b>Save Form Data To Storage</b> checkbox.</li>
<li>Publish Sitecore related changes. Build the code and deploy assembly in bin folder of your Sitecore instance.</li>
</ol>
In next blog post, I’ll explain how to <a href="http://www.bugdebugzone.com/2017/09/wffm-create-custom-save-to-database.html" target="_blank">create a custom save to database action</a>. Comments and suggestions are most welcome. Happy coding!<br />
<h4 style="text-align: left;">
Update:</h4>
After publishing this blog post, I had a nice fruitful conversation with Sitecore MVP <a href="https://twitter.com/jammykam" rel="nofollow" target="_blank">Kamruz Jaman</a> regarding this implementation. If you are not already using custom SQL provider in your solution then prefer to create a custom field to handle above scenario. Nevertheless, this WFFM blog post series will give you fair idea about how to customize SQL form data provider and export form data to excel functionality.
<br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-1VkRFeAJFn4/Wb6RfExy6qI/AAAAAAAAAsU/nfwBO4nwmzU7KfbpxI7WbZBhOYefLz35gCLcBGAs/s1600/tweet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1049" data-original-width="634" src="https://3.bp.blogspot.com/-1VkRFeAJFn4/Wb6RfExy6qI/AAAAAAAAAsU/nfwBO4nwmzU7KfbpxI7WbZBhOYefLz35gCLcBGAs/s1600/tweet.png" /></a></div>
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com1Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-82374636028934135222017-09-09T17:52:00.000+05:302017-09-09T17:52:59.005+05:30WFFM upgrade issue : List field values are empty in Form Designer<div dir="ltr" style="text-align: left;" trbidi="on">
Recently, I was involved in Sitecore upgrade project and encountered few issues. In this blog post, I am going to explain the issue related to WFFM module upgrade. <br />
<h3 style="text-align: left;">
<u>Issue</u> </h3>
We have upgraded to <b>Sitecore 8.1 Update 3</b> CMS only mode and upgraded WFFM module as well. After upgradation, we are seeing an issue in WFFM form designer. The problem is related to WFFM <b>Radio List field</b> or <b>Drop List field</b> in <b>Form Designe</b>r where we are no longer able to see the list items which were present there before the upgrade. See below screenshot:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-3DrYwDRmGsE/WbPZf98Wu9I/AAAAAAAAArY/iblU4sWfreUhyScJfZ7J0rXk7civD0LpACLcBGAs/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="723" data-original-width="1600" src="https://1.bp.blogspot.com/-3DrYwDRmGsE/WbPZf98Wu9I/AAAAAAAAArY/iblU4sWfreUhyScJfZ7J0rXk7civD0LpACLcBGAs/s1600/1.png" /></a></div>
<br />
<b>Radio List field</b> or <b>Drop List field</b> related item data was saved in <b>Parameters</b> field as you can see from the below screenshot:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-Rofsx-HBAVQ/WbPZqArJUAI/AAAAAAAAArc/bx-tJlZx35oAMTl4M0XWvZ4JV5Nyc1GwQCLcBGAs/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="338" data-original-width="1132" src="https://4.bp.blogspot.com/-Rofsx-HBAVQ/WbPZqArJUAI/AAAAAAAAArc/bx-tJlZx35oAMTl4M0XWvZ4JV5Nyc1GwQCLcBGAs/s1600/2.png" /></a></div>
<br />
I’ve tested this functionality on vanilla Sitecore 8.1 update 3 + WFFM instance. After my initial troubleshooting, it seems that Sitecore WFFM 8.1 is now using <b>Localized Parameter</b> field to display the items in <b>Radio List field</b> or <b>Drop List field</b>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-L7BRuSh7_fI/WbPaJzObdrI/AAAAAAAAArk/Vbfi1WSu3voPHWzGkHvhKEIV4RZ0W9rwwCLcBGAs/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="409" data-original-width="1180" src="https://4.bp.blogspot.com/-L7BRuSh7_fI/WbPaJzObdrI/AAAAAAAAArk/Vbfi1WSu3voPHWzGkHvhKEIV4RZ0W9rwwCLcBGAs/s1600/3.png" /></a></div>
<br />
<u><b>WFFM 8.1</b></u>: Whenever we create new form item, <b>Radio List field</b> or <b>Drop List field</b> value gets stored in <b>Parameters </b>and <b>Localized Parameter </b>field. <b>Radio List field</b> or <b>Drop List field</b> is using <b>Localized Parameters</b> field to show those values in the <b>Form Designer</b>. <br />
<br />
I’ve reached out to Sitecore support team and they have registered this behavior as a bug in the current version of the WFFM module. To track the future status of this bug report, please use the reference number 75227.<br />
<br />
Since WFFM 8.0 <b>Localized Parameters</b> are used for the purpose of localization. There is a specific piece of code which was supposed to be executed as post upgrade action, but was not invoked. This code was supposed to copy value from <b>Parameters </b>fields to <b>Localized Parameters</b> to keep this upgrade transition seamless. Since, this code did not execute, intended didn't happen and we have faced the issue. This behavior is not reproducible in WFFM 8.2. <br />
<h3 style="text-align: left;">
<u>Solution</u></h3>
<ol style="text-align: left;">
<li>As a workaround, you can manually copy the value from the <b>Parameters </b>field to the <b>Localized Parameters</b> field in your <b>Radio List field</b> or <b>Drop List field</b> items that are located under form items.</li>
<li>If you have many forms/fields you can ask Sitecore support to provide a script that you can run against your Sitecore instance which will copy the value from the <b>Parameters </b>field to the <b>Localized Parameters</b> field. You have to run the given .aspx page and enter the full path to the folder where your web forms are located (e.g. “/sitecore/system/Modules/Web Forms for Marketers/Website” or “/sitecore/system/Modules/Web Forms for Marketers/library”) to the textbox field. Click the “Update” button. This will updated web forms in <b>master </b>database. <br />I’ve modified the support patch to meet our requirements:
<ul>
<li>Web forms are located at many different places in the Sitecore content tree. We have to find out full path for every web form and repeat the update process for every web form. This process seems cumbersome. Though it is possible to specify common root for all form items, given script is designed to work on items from specific templates only. But it will be more expensive to traverse whole tree compared to specific form folders. I’ve modified the script to find out all the referrers of form template (<b>/sitecore/templates/Web Forms for Marketers/Form {FFB1DA32-2764-47DB-83B0-95B843546A7E}</b>) using <b>Sitecore link database</b>. You can also use Sitecore Powershell Extensions to achieve same output. </li>
<li>We want to avoid publishing operation as it may publish unwanted or work in progress changes to web database and make those changes live. In this case, I’ve modified database name in the script to modify web form field items in web database as well. So, there will not be a need to publish these changes from master to web database. However, please ensure to run script on master as well so that any subsequent publish does not overwrite your changes in web database.</li>
</ul>
</li>
</ol>
<script src="https://gist.github.com/Dheer-Rajpoot/308a7eb1992a5adb532dc1a56ad9f009.js"></script> Comments and suggestions are most welcome. Happy coding!
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com3Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-26581803271998190652017-09-03T18:43:00.000+05:302017-09-03T18:43:05.351+05:30Sitecore - Get items associated with email reminder task<div dir="ltr" style="text-align: left;" trbidi="on">
In Sitecore, you can schedule to send an email reminder to one or more users. Occasionally an author may wish to be reminded of something regarding the item he is working on. Sitecore Reminders are made just for that. They also make the Administrator's work easier, by providing a suitable way of notifying Editors and other staff members about changes needed to be made. Reminder settings for an item are set in the <b>Tasks </b>section:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-mJ_6Rdtn2NU/Wav_h1mLxsI/AAAAAAAAArE/mkFNlrH0-eUtlXueUhKuxB-lLV_sHfUgwCLcBGAs/s1600/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="725" data-original-width="1189" src="https://4.bp.blogspot.com/-mJ_6Rdtn2NU/Wav_h1mLxsI/AAAAAAAAArE/mkFNlrH0-eUtlXueUhKuxB-lLV_sHfUgwCLcBGAs/s1600/11.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
You can also set reminder settings for an item by clicking on Set Reminder in Review Strip of Sitecore Content Editor Ribbon.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-AWsjtgq_fNI/Wav_oR-JHKI/AAAAAAAAArI/JFG3pGAPvBYPbpOCYV1osxW4IwWDUMOkQCLcBGAs/s1600/22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="251" data-original-width="1600" src="https://4.bp.blogspot.com/-AWsjtgq_fNI/Wav_oR-JHKI/AAAAAAAAArI/JFG3pGAPvBYPbpOCYV1osxW4IwWDUMOkQCLcBGAs/s1600/22.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Recently I have stumbled upon a situation where I have to find out all the items which are configured to use Email Reminder task. Execute below SQL query on <b>Core database</b> to get list of item ids which are configured to use Email Reminder task.
<br />
<pre>SELECT ItemId FROM Tasks WHERE taskType='Sitecore.Tasks.EmailReminderTask,Sitecore.Kernel'
</pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-tyqWg-_gvbg/Wav8Yl9E8pI/AAAAAAAAAq4/sqzttmSNknce3hzvGpVejbPGZOeYqdAmwCLcBGAs/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="178" data-original-width="1198" src="https://1.bp.blogspot.com/-tyqWg-_gvbg/Wav8Yl9E8pI/AAAAAAAAAq4/sqzttmSNknce3hzvGpVejbPGZOeYqdAmwCLcBGAs/s1600/3.png" /></a></div>
Comments and suggestions are most welcome. Happy coding!</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-58571191267481005712017-07-15T22:47:00.000+05:302017-07-15T22:50:11.117+05:30A serious error occurred : Sitecore Experience Editor<div dir="ltr" style="text-align: left;" trbidi="on">
Last week I have written a <a href="http://www.bugdebugzone.com/2017/07/an-error-occurred-sitecore-experience.html" target="_blank">blog post</a> about how to solve a mysterious Experience Editor error <b>"An error occurred</b>". This time I have again stumbled upon a similar error in experience editor (Sitecore 8.1 update 3).
<br />
<div class="message_box warning">
A serious error occurred please contact the administrator.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-mH5FdxCtQ50/WWpKwgB6lnI/AAAAAAAAAqg/47vtVUk-QekaMOiDC3FX-BXEqAI93IjNACLcBGAs/s1600/error.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="283" data-original-width="1466" height="123" src="https://4.bp.blogspot.com/-mH5FdxCtQ50/WWpKwgB6lnI/AAAAAAAAAqg/47vtVUk-QekaMOiDC3FX-BXEqAI93IjNACLcBGAs/s640/error.bmp" width="640" /></a></div>
As stated in my last blog post that there could be multiple reasons of such type of error. I’ve started the troubleshooting and noticed below two exceptions in log file:<br />
<br />
<b><u>Exception 1</u>: </b>
<br />
<pre>ERROR Error processing command url:/-/speak/request/v1/expeditor/ExperienceEditor.Social.SocialCenter.GetMessagesCount error:System.InvalidOperationException: Could not retrieve request class for url:/-/speak/request/v1/expeditor/ExperienceEditor.Social.SocialCenter.GetMessagesCount
at Sitecore.ExperienceEditor.Speak.Server.RequestHandler.Process(HttpContext context)
at Sitecore.ExperienceEditor.Speak.Server.RequestHandler.ProcessRequest(HttpContext context)
</pre>
<u><b>Exception 2</b></u><b>:</b>
<br />
<pre>ERROR Error processing command url:/-/speak/request/v1/expeditor/Optimization.ActiveItemTest error:System.InvalidOperationException: Could not retrieve request class for url:/-/speak/request/v1/expeditor/Optimization.ActiveItemTest
at Sitecore.ExperienceEditor.Speak.Server.RequestHandler.Process(HttpContext context)
at Sitecore.ExperienceEditor.Speak.Server.RequestHandler.ProcessRequest(HttpContext context)
</pre>
<b><u>Solving exception 1</u>:</b><br />
Exception 1 was related to Sitecore Social connect. We are using Sitecore in CMS only mode and have disabled <b>Sitecore Social Connector</b> config files. After troubleshooting, I’ve archived below item in <b>core database</b> so that it won’t appear in experience editor ribbon <br />
<b>/sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Page Editor/Social</b><br />
<b><u>Solving exception 2</u>:</b><br />
<br />
Exception 2 was related to Sitecore Content Testing. We were not using <b>Sitecore Content Testing</b> and disabled all the App_Config\Include\ContentTesting\*.config files. After troubleshooting, I found that Content Testing related features are not completely disabled by disabling config files. I was able to disable content testing completely by disabling <b>InjectOptimizationViewMode.js</b> file. To disable js file, navigate to the <b>\Website\sitecore\shell\client\Sitecore\ExperienceEditor\Pipelines\InitializePageEdit</b> folder, and change the <b>InjectOptimizationViewMode.js</b> file extension to <b>.disabled</b>.<br />
<br />
I hope this blog post is helpful to some of you and save few minutes of troubleshooting. If this solution doesn’t help you then make sure to check out other blogs/SO posts related to this error as there can be other reasons for this “<b>A serious error occurred please contact the administrator</b>” error. Comments and suggestions are most welcome. Happy coding! </div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-26691305671253341562017-07-08T23:14:00.001+05:302017-07-15T22:49:33.428+05:30An error occurred : Sitecore Experience Editor<div dir="ltr" style="text-align: left;" trbidi="on">
Lately, I have been involved in Sitecore upgradation project and I ran into below error in Sitecore experience editor after upgradation to Sitecore 8.1 Update 3.
<br />
<div class="message_box warning">
An error occurred</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-MW_Y2sjdhEg/WWEXSSfc1wI/AAAAAAAAAqM/rtH4HG3pGIsqSxGhJfum7_IFSu_34OxggCLcBGAs/s1600/error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="273" data-original-width="1600" height="108" src="https://3.bp.blogspot.com/-MW_Y2sjdhEg/WWEXSSfc1wI/AAAAAAAAAqM/rtH4HG3pGIsqSxGhJfum7_IFSu_34OxggCLcBGAs/s640/error.png" width="640" /></a></div>
The problem appeared in all web browsers. A quick google search has pointed me to various blogs/SO posts related to this error. Unfortunately, these posts don’t help me in rectifying this error. Therefore I have decided to write a quick blog post for those experiencing same error. I was not seeing any javascript related issues in browser console window. I have started deeper investigation in Sitecore logs files and found that below exception was getting logged:
<br />
<pre>ERROR Could not map index document field to property "UpdatedDate" on type : String was not recognized as a valid DateTime.
Exception: System.FormatException
Message: Could not map index document field to property "UpdatedDate" on type Sitecore.ContentTesting.ContentSearch.Models.SuggestedTestSearchResultItem : String was not recognized as a valid DateTime.
Source: Sitecore.ContentSearch
at Sitecore.ContentSearch.DocumentTypeMapInfo.SetProperty(Object target, String propertyName, String documentFieldName, Object value)
at Sitecore.ContentSearch.DefaultDocumentMapper`1.MapFieldValuesToType[TElement](IDictionary`2 fieldValues, TElement result, DocumentTypeMapInfo documentTypeMapInfo)
at Sitecore.ContentSearch.DefaultDocumentMapper`1.MapToType[TElement](TDocument document, SelectMethod selectMethod, IEnumerable`1 virtualFieldProcessors, IEnumerable`1 executionContexts, SearchSecurityOptions securityOptions)
at Sitecore.ContentSearch.LuceneProvider.LuceneSearchResults`1.<GetSearchResults>d__a.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Sitecore.ContentTesting.ContentSearch.TestingSearch.GetSuggestedTests()
at Sitecore.ContentTesting.Data.SitecoreContentTestStore.GetSuggestedTests(DataUri hostItemDataUri, String searchText)
at Sitecore.ContentTesting.Requests.ExperienceEditor.SuggestedTestsCountRequest.ProcessRequest()
at Sitecore.ExperienceEditor.Speak.Server.Requests.PipelineProcessorRequest`1.Process(RequestArgs requestArgs)
Nested Exception
Exception: System.FormatException
Message: String was not recognized as a valid DateTime.
Source: mscorlib
at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
at Sitecore.ContentSearch.Converters.IndexFieldDateTimeValueConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at Sitecore.ContentSearch.Converters.IndexFieldUtcDateTimeValueConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at Sitecore.ContentSearch.Converters.IndexFieldStorageValueFormatter.ReadFromIndexStorage(Object indexValue, String fieldName, Type destinationType)
at Sitecore.ContentSearch.DocumentTypeMapInfo.SetProperty(Object target, String propertyName, String documentFieldName, Object value)
</pre>
This exception was related to Sitecore Content testing. We are using Sitecore in CMS only mode and not using Sitecore Content Testing feature. I’ve followed <a href="https://kb.sitecore.net/articles/785358" rel="nofollow" target="_blank">this KB article</a> to disabled Content Testing in Sitecore 8.1 Update 3. I was still getting Experience editor error after changing the <b>ContentTesting.AutomaticContentTesting.Enabled</b> setting value to <b>false </b>in the <b>App_Config\Include\ContentTesting\Sitecore.ContentTesting.config</b> file. Therefore I have decided to disable <b>OPTIMIZATION </b>ribbon strip which is related to Content Testing functionality. Archive the <b>/sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Optimization</b> item in the <b>core database</b>. It will completely disable the Optimization tab in the Experience Editor.
<br />
<div class="message_box announce">
There are <b>Attributes </b>and <b>PageProfileSettings </b>chunks on this tab that are not related to Content Testing. If you use these chunks, you can move the following items:<br />
<b>/sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Optimization/PageProfileSettings</b><br />
<b>/sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Optimization/Attributes </b><br />
under the <b>/sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Experience</b> item.</div>
After following the instructions above, I no longer saw the Content testing related exception in log files and “An error occurred” notification is also disappeared in the Experience Editor.<br />
<br />
I hope this blog post is helpful to some of you and save few minutes of troubleshooting. If this solution doesn’t help you then make sure to check out other blogs/SO posts related to this error as there can be other reasons for this “<b>An error occurred</b>” error. Comments and suggestions are most welcome. Happy coding!<br />
<br />
<u><b>Update</b></u><b>:</b><br />
I've blogged about my second encounter with similar error in experience editor. Read it <a href="http://www.bugdebugzone.com/2017/07/a-serious-error-occurred-sitecore.html" target="_blank">here</a>. </div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-50704493681415894542017-04-08T11:44:00.000+05:302017-04-08T11:44:11.809+05:30Adding Delete subitems action to Sitecore Context Menu<div dir="ltr" style="text-align: left;" trbidi="on">
I have been working with Sitecore Data Exchange Framework 1.3 and got into a situation where I wanted to remove all subitems of a specific item without deleting that specific item. For example, let’s consider the below screenshot of Sitecore content tree: <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-r3_9vrl_CDE/WOh6qpSxbTI/AAAAAAAAApI/hb6iFpRKgJAM3-nFLd7WbluiIqppsTkdwCLcB/s1600/1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-r3_9vrl_CDE/WOh6qpSxbTI/AAAAAAAAApI/hb6iFpRKgJAM3-nFLd7WbluiIqppsTkdwCLcB/s1600/1.bmp" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-XuiFUkycfnc/WOh68xPJvRI/AAAAAAAAApM/JQNkUZPVB7UJj8HHK95ZGKb1EG0ds8rswCLcB/s1600/2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-XuiFUkycfnc/WOh68xPJvRI/AAAAAAAAApM/JQNkUZPVB7UJj8HHK95ZGKb1EG0ds8rswCLcB/s1600/2.bmp" /></a></div>
I am working on <b>CD Catalog Pipeline Batch</b> item of <b>Sitecore Data Exchange Framework 1.3</b> and whenever I click on <b>Run Pipeline Batch</b> button available in <b>Data Exchange Ribbon</b>, it creates multiple items under <b>CD Catalog</b> item from XML file. I am developing and testing custom XML provider for Data Exchange framework thus there is a frequent need to delete all subitems under <b>CD Catalog</b> item except <b>CD Catalog</b> item folder. If I right click on <b>CD Catalog</b> item then <b>Sitecore Context Menu</b> gives me option to delete <b>CD Catalog</b> item which will eventually delete all subitems under it but I don’t want to delete <b>CD Catalog</b> item folder.<br />
<br />
Although Sitecore provides an option to delete subitems of a particular item. In this case, I have to follow below steps:<br />
<ol style="text-align: left;">
<li>I have to navigate away from current item <b>CD Catalog Pipeline Batch</b> and have to select <b>CD Catalog</b> item in content tree. </li>
<li>I have to make sure that <b>HOME </b>ribbon is selected. Click on <b>Delete subitems</b> button available in <b>Operations </b>chunk.<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-RmZ4ynEyJVQ/WOh7_LGwkhI/AAAAAAAAApU/T3APHIcxoFwmuRrwxo4Hi_Oo7VcG9Ps6gCLcB/s1600/3.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-RmZ4ynEyJVQ/WOh7_LGwkhI/AAAAAAAAApU/T3APHIcxoFwmuRrwxo4Hi_Oo7VcG9Ps6gCLcB/s1600/3.bmp" /></a></div>
</li>
</ol>
I prefer to delete items using <b>Context Menu Delete</b> action rather than <b>HOME </b>ribbon <b>Delete</b> action because I don’t want to navigate away from my current item and I am not always working on <b>HOME</b> ribbon. I like customizing Sitecore client interface to fit my personal requirements and to speed up the development. Adding Delete subitems functionality to Sitecore Context Menu is easy. Follow below steps to add Delete subitems functionality to Sitecore Context Menu:<br />
<ol style="text-align: left;">
<li>Login into Sitecore Client and select <b>Core </b>database.</li>
<li>Navigate to <b>/sitecore/content/Applications/Content Editor/Context Menues/Default/Delete</b>. </li>
<li>You will find <b>item:delete(id=$Target) </b>in<b> Message</b> field. Clear the content of Message field.
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-b3COVAzrzAM/WOh8kgvKYpI/AAAAAAAAApc/GefpCJBK1gMSh_uTUxQ91z-5WOO_J-bVQCLcB/s1600/4.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-b3COVAzrzAM/WOh8kgvKYpI/AAAAAAAAApc/GefpCJBK1gMSh_uTUxQ91z-5WOO_J-bVQCLcB/s1600/4.bmp" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-LyaCjbs8VlA/WOh8oq5rULI/AAAAAAAAApg/evPdI7ZnmBsvXOLD3UeeVG7_vRLBtuVkQCLcB/s1600/5.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-LyaCjbs8VlA/WOh8oq5rULI/AAAAAAAAApg/evPdI7ZnmBsvXOLD3UeeVG7_vRLBtuVkQCLcB/s1600/5.bmp" /></a></div>
</li>
<li>Create a new child item under /<b>sitecore/content/Applications/Content Editor/Context Menues/Default/Delete</b> node using template <b>/sitecore/templates/System/Menus/Menu item</b>. Set item name as <b>Delete</b>.</li>
<li>Enter <b>item:delete(id=$Target)</b> in <b>Message </b>field and set <b>Display name</b> as <b>Delete</b>. Also set <b>Icon </b>field.<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-Y6_8jtEvZwE/WOh9Rof4wTI/AAAAAAAAApo/rfAewEFFmfA3Vbi4ErchTvp3xwLavfiNACLcB/s1600/6.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-Y6_8jtEvZwE/WOh9Rof4wTI/AAAAAAAAApo/rfAewEFFmfA3Vbi4ErchTvp3xwLavfiNACLcB/s1600/6.bmp" /></a></div>
</li>
<li>Create a new child item under <b>/sitecore/content/Applications/Content Editor/Context Menues/Default/Delete</b> node using template <b>/sitecore/templates/System/Menus/Menu</b> item. Set item name as <b>Delete Subitems</b>.</li>
<li>Enter <b>item:deletechildren(id=$Target)</b> in <b>Message </b>field and set <b>Display name</b> as <b>Delete</b> <b>Subitems</b>. Also set <b>Icon </b>field.<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-bGShubskuIs/WOh-AmozM-I/AAAAAAAAApw/SB8T-_u6FBA3sitN9zIvRa8qDQDFnwK7ACLcB/s1600/7.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-bGShubskuIs/WOh-AmozM-I/AAAAAAAAApw/SB8T-_u6FBA3sitN9zIvRa8qDQDFnwK7ACLcB/s1600/7.bmp" /></a></div>
</li>
<li>Navigate to <b>Master </b>database and right click on <b>CD Catalog</b> item. You will notice <b>Delete Subitems</b> action is available in Sitecore context menu.<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-P3Rh2hY2HPM/WOh-Sta2UlI/AAAAAAAAAp0/fmyulsv-96UVc2Uu2xykfNxKfLy60yxegCLcB/s1600/8.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-P3Rh2hY2HPM/WOh-Sta2UlI/AAAAAAAAAp0/fmyulsv-96UVc2Uu2xykfNxKfLy60yxegCLcB/s1600/8.bmp" /></a></div>
</li>
</ol>
Comments and suggestions are most welcome. Happy coding!</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-10496487025311982842017-04-02T21:32:00.000+05:302017-04-22T00:59:23.959+05:30XML provider for Sitecore Data Exchange Framework 1.3 - Part 2<div dir="ltr" style="text-align: left;" trbidi="on">
In the <a href="http://www.bugdebugzone.com/2017/04/xml-provider-for-sitecore-data-exchange.html" target="_blank">previous blog post</a>, I have explained about Sitecore Data Exchange Framework 1.3 and how to build XML provider for Data Exchange Framework. In this blog post, I’ll explain how to create and populate Sitecore items from the contents of a XML stream using XML provider for Data Exchange Framework 1.3. <br />
<br />
I’ve created a XML file from this <a href="https://www.w3schools.com/xml/cd_catalog.xml" rel="nofollow" target="_blank">web address</a> that contains information about different Music CDs. Each CD node in the XML file represents a single music CD. Each CD will be represented in Sitecore as an item. The synchronization process will read the music CDs information from the XML file and create Sitecore items for each. If a Sitecore item already exists for a CD in the file, the Sitecore item will be updated with the information from the file.
<br />
<pre><CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
</CATALOG>
</pre>
<h3 style="text-align: left;">
Using XML provider for Data Exchange Framework 1.3 </h3>
<ol style="text-align: left;">
<li>Make sure that <a href="https://dev.sitecore.net/Downloads/Data_Exchange_Framework/1x/Data_Exchange_Framework_1_3.aspx" rel="nofollow" target="_blank">Data Exchange Framework 1.3</a> Sitecore package and <a href="https://dev.sitecore.net/Downloads/Data_Exchange_Framework/1x/Data_Exchange_Framework_1_3.aspx" rel="nofollow" target="_blank">Sitecore Provider for Data Exchange Framework 1.3</a> Sitecore package are installed in your Sitecore 8.2 instance. </li>
<li>Download <a href="https://github.com/Dheer-Rajpoot/Sitecore.DataExchange.Providers.XMLSystem/blob/master/Sitecore.DataExchange.Providers.XML/Sitecore%20Package/XML%20Provider%20for%20Sitecore%20Data%20Exchange%20Framework-1.3.zip" rel="nofollow" target="_blank">XML Provider for Sitecore Data Exchange Framework-1.3</a> Sitecore package and install in your Sitecore 8.2 instance.</li>
<li>Create a XML file. I’ve uploaded one sample <a href="https://github.com/Dheer-Rajpoot/Sitecore.DataExchange.Providers.XMLSystem/blob/master/Sitecore.DataExchange.Providers.XML/Sample%20XML%20File/cd_catalog.xml" rel="nofollow" target="_blank">XML file here</a>. You may place this file wherever you want, but it must be accessible from your Sitecore server.
</li>
<li>In Sitecore, open Content Editor. Navigate to sitecore > system > Data Exchange. Create a new item using Empty Data Exchange Template and name it as XML Provider CD Catalog Tenant.<br /><br /> <div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-Nf-0I4MCg68/WOEIA_5ESEI/AAAAAAAAAk4/rBlAjbaVAwYXSeCdv0fQpIgG4mJSZJo8wCLcB/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-Nf-0I4MCg68/WOEIA_5ESEI/AAAAAAAAAk4/rBlAjbaVAwYXSeCdv0fQpIgG4mJSZJo8wCLcB/s1600/4.png" /></a></div>
</li>
<li>Tick the checkbox for field <b>Enabled</b>.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-KAvFwTgaYdA/WOEILgOtLqI/AAAAAAAAAk8/LgM7tlS-nRw2xg2pxIBArFXrXA32uAB-QCLcB/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-KAvFwTgaYdA/WOEILgOtLqI/AAAAAAAAAk8/LgM7tlS-nRw2xg2pxIBArFXrXA32uAB-QCLcB/s1600/5.png" /></a></div>
</li>
<li>Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Endpoints/Providers</b>. An endpoint is needed to identify the source file within the synchronization process. First we must create the folder into which XML system endpoints can be added. Create new item using template XML Systems Endpoints Root. This template is a command template. It does not prompt for the item name. The command template assigns the item name automatically.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-uLw9iZBel58/WOEIYuRWqJI/AAAAAAAAAlA/0jqCPGao1rgtnwtxOx9jglnOHYmdvtCgQCLcB/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-uLw9iZBel58/WOEIYuRWqJI/AAAAAAAAAlA/0jqCPGao1rgtnwtxOx9jglnOHYmdvtCgQCLcB/s1600/6.png" /></a></div>
</li>
<li>Next we must add an endpoint to the folder. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Endpoints/Providers/XML System</b>. Create a new XML System Endpoint and name it as CD Catalog XML System Endpoint.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-9A04NYKjRtw/WOEItPKgIGI/AAAAAAAAAlE/sDhcERsv1dQQQmGiKCa1Ib77PeMfZmCqgCLcB/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-9A04NYKjRtw/WOEItPKgIGI/AAAAAAAAAlE/sDhcERsv1dQQQmGiKCa1Ib77PeMfZmCqgCLcB/s1600/7.png" /></a></div>
</li>
<li>In <b>XML Path</b> field, enter the path of XML file. I’ve placed XML file into root folder of website. The path can be either a local XML file or a web address returning XML Data (http or https).</li>
<li>In <b>XML Node Name</b> field, enter name of XML node which will be used to get a collection of matching nodes from XML Data. I’ve entered CD as XML Node Name.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-Vl5UMD4i8uw/WOEJgCTKz1I/AAAAAAAAAlM/8MVx8NotICoaDRbpbMdKk8hJ5h3U3-5BACLcB/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-Vl5UMD4i8uw/WOEJgCTKz1I/AAAAAAAAAlM/8MVx8NotICoaDRbpbMdKk8hJ5h3U3-5BACLcB/s1600/8.png" /></a></div>
<a name='more'></a><a href="https://3.bp.blogspot.com/-Vl5UMD4i8uw/WOEJgCTKz1I/AAAAAAAAAlM/8MVx8NotICoaDRbpbMdKk8hJ5h3U3-5BACLcB/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><br />
</li>
<li>Add Value Accessor Set for Source. The source object is a XML Node <b><CD></b> which holds the child nodes <b><TITLE></b>, <b><ARTIST></b>, <b><COUNTRY></b>, <b><COMPANY></b>, <b><PRICE></b> and <b><YEAR></b>. The value accessor set defines the values that are available in XML Node <b><CD></b>. First we must create the folder into which the value accessor set can be added. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Data Access/Value Accessor Sets/Providers</b>. Create new item using template XML System Value Accessor Sets Root. This template is a command template. It does not prompt for the item name. The command template assigns the item name automatically.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-iyrTHqG6y2s/WOEJxdcDHpI/AAAAAAAAAlQ/LGphBSPpIPcFPT55Pt97Xuow8k2QsLvZgCLcB/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-iyrTHqG6y2s/WOEJxdcDHpI/AAAAAAAAAlQ/LGphBSPpIPcFPT55Pt97Xuow8k2QsLvZgCLcB/s1600/9.png" /></a></div>
</li>
<li>Next we must add a value accessor set to the folder. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Data Access/Value Accessor Sets/Providers/XML System</b>. Create new XML Element Value Accessor Set and name it as CD Catalog Information Fields.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-BK9DqEMU1VU/WOEKdn56krI/AAAAAAAAAlY/YM2M_vG26Yk4gGv8zbYOrNglYyRVR5MDgCLcB/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-BK9DqEMU1VU/WOEKdn56krI/AAAAAAAAAlY/YM2M_vG26Yk4gGv8zbYOrNglYyRVR5MDgCLcB/s1600/10.png" /></a></div>
</li>
<li>Next we must add value accessor items to the value accessor set. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Data Access/Value Accessor Sets/Providers/XML System/CD Catalog Information Fields</b>. Create Value Accessor items for child nodes <b><TITLE></b>, <b><ARTIST></b>, <b><COUNTRY></b>, <b><COMPANY></b>, <b><PRICE></b> and <b><YEAR></b> using XML Element Value Accessor template. Enter Child Node name in XML Element Name field.
<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-f1kS1IZbWk8/WOEOl2e5CWI/AAAAAAAAAlk/fNhQJtVe5Xcz1rHZ5kLuBnTB5F4NlXwNwCLcB/s1600/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-f1kS1IZbWk8/WOEOl2e5CWI/AAAAAAAAAlk/fNhQJtVe5Xcz1rHZ5kLuBnTB5F4NlXwNwCLcB/s1600/11.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-W3Pbd6usq1s/WOEOumupGAI/AAAAAAAAAlo/sIeg2j8Qn2IPth9b92tlVoYZfSVlEgBxACLcB/s1600/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-W3Pbd6usq1s/WOEOumupGAI/AAAAAAAAAlo/sIeg2j8Qn2IPth9b92tlVoYZfSVlEgBxACLcB/s1600/12.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-dRcyCLVPXjY/WOEPVD6xCeI/AAAAAAAAAlw/pJpobCGFH5MHW4evF8TSm5s_DFtrXwt7wCLcB/s1600/13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-dRcyCLVPXjY/WOEPVD6xCeI/AAAAAAAAAlw/pJpobCGFH5MHW4evF8TSm5s_DFtrXwt7wCLcB/s1600/13.png" /></a></div>
</li>
<li>Create Template for Target. A Sitecore template is needed to represent the data that is read from the file. Items based on this template are created using the data that is read from the file. Navigate to <b>/sitecore/templates/User Defined</b>. Create new template CD Catalog Item as shown below:<br /> <div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-GTbbYJX9KKE/WOEP-PI4UII/AAAAAAAAAl4/kNHA1MexdagsMG0i54FGic4L4GWTMcXOQCLcB/s1600/14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-GTbbYJX9KKE/WOEP-PI4UII/AAAAAAAAAl4/kNHA1MexdagsMG0i54FGic4L4GWTMcXOQCLcB/s1600/14.png" /></a></div>
</li>
<li>Add Folder to hold new Sitecore Items. The result of the synchronization process is that Sitecore items will be created for each XML Node <b><CD></b> in the XML file that is read. A parent item is needed for these new Sitecore items. In Content Editor, navigate to <b>/sitecore/Content</b>. Create new folder and name it as CD Catalog.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-sIxyoo677d8/WOEQXAPsjzI/AAAAAAAAAl8/2kRXYPn2a7wErB10yXWXhv4hvRjEbzSNQCLcB/s1600/15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-sIxyoo677d8/WOEQXAPsjzI/AAAAAAAAAl8/2kRXYPn2a7wErB10yXWXhv4hvRjEbzSNQCLcB/s1600/15.png" /></a></div>
</li>
<li>Add Endpoint for Target. An endpoint is needed to identify the Sitecore database within the synchronization process. First we must create the folder into which file system endpoints can be added. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Endpoints/Providers</b>. Create new Sitecore Endpoints Root item. This template is a command template. It does not prompt for the item name. The command template assigns the item name automatically.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-KFNXimyeRPw/WOEQlDEbWZI/AAAAAAAAAmA/8jOs3bDAUKQ2FyLNbWr6Euh3EIF9J6cVwCLcB/s1600/16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-KFNXimyeRPw/WOEQlDEbWZI/AAAAAAAAAmA/8jOs3bDAUKQ2FyLNbWr6Euh3EIF9J6cVwCLcB/s1600/16.png" /></a></div>
</li>
<li>Next we must add an endpoint to the folder. Create new item using Sitecore Item Model Repository Endpoint and name it as Sitecore Database Endpoint.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-A1prWtGSppc/WOEQzc42VhI/AAAAAAAAAmE/u-Bp5g_lkSgBg59cYPWKqY-YDJUrl-onACLcB/s1600/17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-A1prWtGSppc/WOEQzc42VhI/AAAAAAAAAmE/u-Bp5g_lkSgBg59cYPWKqY-YDJUrl-onACLcB/s1600/17.png" /></a></div>
</li>
<li>Add Value Accessor Set for Target. The target object is a Sitecore item. The value accessor set defines the fields that can be set on the item. First we must create the folder into which the value accessor set can be added. Navigate to /sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Data Access/Value Accessor Sets/Providers. Create new Sitecore Value Accessor Sets Root item. This template is a command template. It does not prompt for the item name. The command template assigns the item name automatically.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-o3biFF6-UT0/WOERAKbE9MI/AAAAAAAAAmI/n_cLBj8GwiQ-qX7PFmHLdur2Fgaa7vmlQCLcB/s1600/18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-o3biFF6-UT0/WOERAKbE9MI/AAAAAAAAAmI/n_cLBj8GwiQ-qX7PFmHLdur2Fgaa7vmlQCLcB/s1600/18.png" /></a></div>
</li>
<li>Next we must add a value accessor set to the folder. Create new item using template Sitecore Item Field Value Accessor Set and name it as CD Catalog Information Item.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-97KwveZ3Zh4/WOERutYcVUI/AAAAAAAAAmQ/dBZjpN1Qj7AsCDamsSSchZ_vTSvMg55PwCLcB/s1600/19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-97KwveZ3Zh4/WOERutYcVUI/AAAAAAAAAmQ/dBZjpN1Qj7AsCDamsSSchZ_vTSvMg55PwCLcB/s1600/19.png" /></a></div>
</li>
<li>Next we must add value accessor items to the value accessor set. These represent the fields that can be set on the Sitecore item that is the target object in the mapping process. Create Value Accessor items for Sitecore item fields <b>TITLE</b>, <b>ARTIST</b>, <b>COUNTRY</b>, <b>COMPANY</b>, <b>PRICE</b> and <b>YEAR </b>using Sitecore Item Field Value Accessor template. Set field value to corresponding field of Target Sitecore item template.
<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-QGGMMb9LdJo/WOESHLmpi2I/AAAAAAAAAmU/CPxzJaEKWxUwoEbCkWeR93EQ84m74i7qwCLcB/s1600/20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-QGGMMb9LdJo/WOESHLmpi2I/AAAAAAAAAmU/CPxzJaEKWxUwoEbCkWeR93EQ84m74i7qwCLcB/s1600/20.png" /></a>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-e0bExHBaWyU/WOESblibfXI/AAAAAAAAAmY/OPmCBVuH-y8RfmL-vMa718e6zVb77ggxgCLcB/s1600/21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-e0bExHBaWyU/WOESblibfXI/AAAAAAAAAmY/OPmCBVuH-y8RfmL-vMa718e6zVb77ggxgCLcB/s1600/21.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-30Rjh5r_RaM/WOESf8W4xPI/AAAAAAAAAmc/nlVNe41A4d81UrqZo2KjtqGI2x16SjRswCLcB/s1600/22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-30Rjh5r_RaM/WOESf8W4xPI/AAAAAAAAAmc/nlVNe41A4d81UrqZo2KjtqGI2x16SjRswCLcB/s1600/22.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-mOlxbLwySoU/WOESmZP9JNI/AAAAAAAAAmg/fu_1iN3Kz-4iEUP_p9VOJrtmzvxDyoZ5QCLcB/s1600/23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-mOlxbLwySoU/WOESmZP9JNI/AAAAAAAAAmg/fu_1iN3Kz-4iEUP_p9VOJrtmzvxDyoZ5QCLcB/s1600/23.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-nqg64_gbYWk/WOESqhBxpCI/AAAAAAAAAmk/57WPfzqP_R05b0z5oByReSVqzXVf_XHmQCLcB/s1600/24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-nqg64_gbYWk/WOESqhBxpCI/AAAAAAAAAmk/57WPfzqP_R05b0z5oByReSVqzXVf_XHmQCLcB/s1600/24.png" /></a></div>
</li>
<li>Add Value Mapping Set. The value mapping set is where you associate each value accessor from the source object with one from the target object. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Value Mapping Sets</b>. Add new Value Mapping Set and name it as XML CD Catalog Data to Sitecore CD Catalog Item.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-ptD54a8xsuk/WOETtya3KrI/AAAAAAAAAms/8scQrP5_6n8Z93zFYr-53YopBAG0K_-QACLcB/s1600/25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-ptD54a8xsuk/WOETtya3KrI/AAAAAAAAAms/8scQrP5_6n8Z93zFYr-53YopBAG0K_-QACLcB/s1600/25.png" /></a></div>
</li>
<li>Navigate to <b>/sitecore/system/Data Exchange/XML CD Catalog Tenant/Value Mapping Sets/XML CD Catalog Data to Sitecore CD Catalog Item</b> and create value mapping item to associate each value accessor from the XML object with one from the target Sitecore object.
<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-dfOXsQcw4j4/WOEUCt8ew8I/AAAAAAAAAmw/M9OhhvysJyc5vfKLKja4pT2M6yGSeX84gCLcB/s1600/26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-dfOXsQcw4j4/WOEUCt8ew8I/AAAAAAAAAmw/M9OhhvysJyc5vfKLKja4pT2M6yGSeX84gCLcB/s1600/26.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-9JOw8lvXXpg/WOEUH4UNIPI/AAAAAAAAAm0/LEmN5aayp3kfFIsR7ggJSIUflA3NwpKAQCLcB/s1600/27.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-9JOw8lvXXpg/WOEUH4UNIPI/AAAAAAAAAm0/LEmN5aayp3kfFIsR7ggJSIUflA3NwpKAQCLcB/s1600/27.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-xzFvv3l8Vm0/WOEUM1Wv7pI/AAAAAAAAAm4/HRcuSn90BAAIfjSofTMcLhkt0aqCLMauQCLcB/s1600/28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-xzFvv3l8Vm0/WOEUM1Wv7pI/AAAAAAAAAm4/HRcuSn90BAAIfjSofTMcLhkt0aqCLMauQCLcB/s1600/28.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-iAHlZV0Zpw8/WOEUR93W33I/AAAAAAAAAm8/N5RQgboHBCEG1N02E07CZk3dDPU-xvvSQCLcB/s1600/29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-iAHlZV0Zpw8/WOEUR93W33I/AAAAAAAAAm8/N5RQgboHBCEG1N02E07CZk3dDPU-xvvSQCLcB/s1600/29.png" /></a></div>
</li>
<li>Add Pipeline to Sync Single Record from Source. The synchronization process we are modeling consists of two pipelines. The first pipeline reads data from a source object, which is a XML file. The second pipeline handles a single XML node<b> <CD></b> from the XML source. The first pipeline calls the second pipeline, we must configure the second pipeline before we can configure the first. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Pipelines</b>. Create new pipeline and name it as CD Catalog XML Data to CD Catalog Sitecore Item Sync Pipeline.
<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-PrMpYlYAhjk/WOEU4HFlD4I/AAAAAAAAAnE/oOINfbiVT1wG0K9O7XzPq-xbD4-RpVtkwCLcB/s1600/30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-PrMpYlYAhjk/WOEU4HFlD4I/AAAAAAAAAnE/oOINfbiVT1wG0K9O7XzPq-xbD4-RpVtkwCLcB/s1600/30.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-Bo4evkydBdE/WOEU9p8G6wI/AAAAAAAAAnI/_uzHpw0PafUDdP3AjmOg292VL6orysdTQCLcB/s1600/31.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-Bo4evkydBdE/WOEU9p8G6wI/AAAAAAAAAnI/_uzHpw0PafUDdP3AjmOg292VL6orysdTQCLcB/s1600/31.png" /></a></div>
</li>
<li>Add Pipline Step to Resolve Target Item. The first pipeline step determines whether or not a Sitecore item already exists for the XML Node <b><CD></b> from the XML file. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Pipelines/CD Catalog XML Data to CD Catalog Sitecore Item Sync Pipeline</b>. Create new item using template Resolve Sitecore Item Pipeline Step and name it as Resolve CD Catalog Information Item.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-HfJXSumsiRc/WOEVTUlxByI/AAAAAAAAAnM/uNZyhJ0s7GEc1Q_F95hBWpEXzRx6yEcmgCLcB/s1600/32.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-HfJXSumsiRc/WOEVTUlxByI/AAAAAAAAAnM/uNZyhJ0s7GEc1Q_F95hBWpEXzRx6yEcmgCLcB/s1600/32.png" /></a></div>
</li>
<li>Set the following field values of Resolve CD Catalog Information Item:
<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-V6gV1aS05Qc/WOEV4gXHCNI/AAAAAAAAAnU/ilEGiODCpPw93AArQbWPUyfHXy2FZvkFgCLcB/s1600/33.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-V6gV1aS05Qc/WOEV4gXHCNI/AAAAAAAAAnU/ilEGiODCpPw93AArQbWPUyfHXy2FZvkFgCLcB/s1600/33.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-h3gZr9iwtiQ/WOEV-Sp5-kI/AAAAAAAAAnY/21RZgpuJVQsjy6YRC31aPCqGqTpHe5O3ACLcB/s1600/34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-h3gZr9iwtiQ/WOEV-Sp5-kI/AAAAAAAAAnY/21RZgpuJVQsjy6YRC31aPCqGqTpHe5O3ACLcB/s1600/34.png" /></a></div>
</li>
<li>Add Pipeline Step to Apply Mappings. The second pipeline step applies the value mapping set we configured in Add Value Mapping Set. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Pipelines/CD Catalog XML Data to CD Catalog Sitecore Item Sync Pipeline</b>. Create new item using Apply Mapping Pipeline Step template and name it as Apply Mapping.<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-YmXhmC3wc-o/WOEWxY0BfLI/AAAAAAAAAng/_WEAO0KFOKQqhpvFGA_tNO4_bkJt1X37gCLcB/s1600/35.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-YmXhmC3wc-o/WOEWxY0BfLI/AAAAAAAAAng/_WEAO0KFOKQqhpvFGA_tNO4_bkJt1X37gCLcB/s1600/35.png" /></a></div>
</li>
<li>Set the following field value:<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-QKauzOauV5s/WOEW8dal37I/AAAAAAAAAnk/UFZ31RoSolgEjwjfNyzJleeSdlFf2pV5gCLcB/s1600/36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-QKauzOauV5s/WOEW8dal37I/AAAAAAAAAnk/UFZ31RoSolgEjwjfNyzJleeSdlFf2pV5gCLcB/s1600/36.png" /></a></div>
</li>
<li>Add Pipeline Step to Update Sitecore Item. The target object represents a Sitecore item, but it is not, itself, a Sitecore item. The actual Sitecore item must be updated. A pipeline step must be configured in order for this to happen. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Pipelines/CD Catalog XML Data to CD Catalog Sitecore Item Sync Pipeline</b>. Create new item using Update Sitecore Item Pipeline Step template and name it as Update Sitecore Item.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/--98fDhFHi68/WOEXSa6e2BI/AAAAAAAAAno/JwdJADeONl0zMxCldRuYw5SnljfWlSagQCLcB/s1600/37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/--98fDhFHi68/WOEXSa6e2BI/AAAAAAAAAno/JwdJADeONl0zMxCldRuYw5SnljfWlSagQCLcB/s1600/37.png" /></a></div>
</li>
<li>Set the following field value:<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-_b6BYt5AoKE/WOEXjvZT50I/AAAAAAAAAns/PrAt8G75HaoMDnZvVJ_fIKVB_wMg2QLDgCLcB/s1600/38.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-_b6BYt5AoKE/WOEXjvZT50I/AAAAAAAAAns/PrAt8G75HaoMDnZvVJ_fIKVB_wMg2QLDgCLcB/s1600/38.png" /></a></div>
</li>
<li>Make sure the pipeline steps are in the following order:<br />a. Resolve CD Catalog Information Item<br />b. Apply Mapping<br />c. Update Sitecore Item<br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-SQBKtw38aQk/WOEY9gBQ-GI/AAAAAAAAAn4/8ucWelTbuTMc_VY7eZd1uByjURuOqckBACLcB/s1600/39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-SQBKtw38aQk/WOEY9gBQ-GI/AAAAAAAAAn4/8ucWelTbuTMc_VY7eZd1uByjURuOqckBACLcB/s1600/39.png" /></a></div>
</li>
<li>Add Pipeline to Read Source. We just configured the pipeline CD Catalog XML Data to CD Catalog Sitecore Item Sync Pipeline, which handles a single XML node <b><CD></b> from a XML file. Now we must configure the pipeline that reads the data from the file, and handles each XML node<b> <CD></b> by passing it to CD Catalog XML Data to CD Catalog Sitecore Item Sync Pipeline. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Pipelines</b>. Create a new pipeline and name it as Read CD Catalog Information from XML Data Pipeline.
<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-9LyIRxaEqP4/WOEbapOSBjI/AAAAAAAAAoE/QRtFU1Ugn3o-yClq7yr4lC8-2NF1KXU_wCLcB/s1600/40.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-9LyIRxaEqP4/WOEbapOSBjI/AAAAAAAAAoE/QRtFU1Ugn3o-yClq7yr4lC8-2NF1KXU_wCLcB/s1600/40.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-5q1qVUzgRpo/WOEbh_Bg6II/AAAAAAAAAoI/ZNMBoo7QdAYApm51wlLOQIGIA35GnDyowCLcB/s1600/41.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-5q1qVUzgRpo/WOEbh_Bg6II/AAAAAAAAAoI/ZNMBoo7QdAYApm51wlLOQIGIA35GnDyowCLcB/s1600/41.png" /></a></div>
</li>
<li>Add Pipeline Step to Read from Source. The first pipeline step reads the text file configured in the endpoint. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Pipelines/Read CD Catalog Information from XML Data Pipeline</b>. Create a new item using template Read XML Data Pipeline Step and name it as Read XML Data.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-E8WKmcGVyOU/WOEb57mlpOI/AAAAAAAAAoM/MjxprNGBlpo3L1vkpEtcHjbBtxrCXQiSgCLcB/s1600/42.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-E8WKmcGVyOU/WOEb57mlpOI/AAAAAAAAAoM/MjxprNGBlpo3L1vkpEtcHjbBtxrCXQiSgCLcB/s1600/42.png" /></a></div>
</li>
<li>Set the following field value:<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-zyTsBqlGgFk/WOEcPCrrZVI/AAAAAAAAAoQ/Au_QO6wL1gU6_AaIDsxdICFQU0mx4cXCgCLcB/s1600/43.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-zyTsBqlGgFk/WOEcPCrrZVI/AAAAAAAAAoQ/Au_QO6wL1gU6_AaIDsxdICFQU0mx4cXCgCLcB/s1600/43.png" /></a></div>
</li>
<li>Add Pipeline Step to Iterate Data from Source. The second pipeline step iterates the data from the XML field. For each row, another pipeline is run. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Pipelines/Read CD Catalog Information</b> from XML Data Pipeline. Create new item using Iterate Data and Run Pipelines Pipeline Step template and name it as Iterate Rows from XML Data and Run Pipeline.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-_Gp-pGTLqn8/WOEcfic7-aI/AAAAAAAAAoU/02BK4NLJWM8IyLPHwae43B-pPNXXqgYZQCLcB/s1600/44.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-_Gp-pGTLqn8/WOEcfic7-aI/AAAAAAAAAoU/02BK4NLJWM8IyLPHwae43B-pPNXXqgYZQCLcB/s1600/44.png" /></a></div>
</li>
<li>Set the following field value:<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-4sYKhAou2LA/WOEculd-cdI/AAAAAAAAAoY/_iBjvmFRSNsO4n9DwqXOfGqOpKfhgkLBACLcB/s1600/45.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-4sYKhAou2LA/WOEculd-cdI/AAAAAAAAAoY/_iBjvmFRSNsO4n9DwqXOfGqOpKfhgkLBACLcB/s1600/45.png" /></a></div>
</li>
<li>Make sure the pipeline steps are in the following order:<br />a. Read XML Data<br />b. Iterate Rows from XML Data and Run Pipeline<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-SVUh9Y_x3XA/WOEdIYXBLkI/AAAAAAAAAoc/QgbOEYPqXdouHiFgqelhjXnnUdl9T2PFwCLcB/s1600/46.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-SVUh9Y_x3XA/WOEdIYXBLkI/AAAAAAAAAoc/QgbOEYPqXdouHiFgqelhjXnnUdl9T2PFwCLcB/s1600/46.png" /></a></div>
</li>
<li>Add Pipeline Batch. A pipeline batch is used to run pipelines. A pipeline batch can be run manually, through the Sitecore task scheduler or through the Data Exchange Framework API. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Pipeline Batches</b>. Create new item using template Pipeline Batch and name it as CD Catalog Information XML Data to CD Catalog Information Item Sync Pipeline Batch.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-CnLNB-ZXjlY/WOEdg3PVyJI/AAAAAAAAAog/Ki1Z_WvcUkUc7KEX22p8ePuSj8tbHccDQCLcB/s1600/47.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-CnLNB-ZXjlY/WOEdg3PVyJI/AAAAAAAAAog/Ki1Z_WvcUkUc7KEX22p8ePuSj8tbHccDQCLcB/s1600/47.png" /></a></div>
</li>
<li>Set the following field value:<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-YmS02A-JqCI/WOEdtppDlyI/AAAAAAAAAok/MsIIFjyp5FoHmAcJjgiEySiW2aHcqpRsgCLcB/s1600/48.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-YmS02A-JqCI/WOEdtppDlyI/AAAAAAAAAok/MsIIFjyp5FoHmAcJjgiEySiW2aHcqpRsgCLcB/s1600/48.png" /></a></div>
</li>
<li>Test Pipeline Batch. The pipeline batch is ready to run. Navigate to <b>/sitecore/system/Data Exchange/XML Provider CD Catalog Tenant/Pipeline Batches/CD Catalog Information XML Data to CD Catalog Information Item Sync Pipeline Batch</b>. In the Content Editor ribbon, click Run Pipeline Batch.<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-VkNERzLhn4o/WOEeACxd-xI/AAAAAAAAAoo/ay681gvORXMdesqXp46jIbkkBxgX2YyZgCLcB/s1600/49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-VkNERzLhn4o/WOEeACxd-xI/AAAAAAAAAoo/ay681gvORXMdesqXp46jIbkkBxgX2YyZgCLcB/s1600/49.png" /></a></div>
</li>
<li>Click OK.<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-HPTRsjqvNe4/WOEeL-DVxUI/AAAAAAAAAos/5HADhf7bGF8e3Q2DRU-LJ_zJoAwMdL64QCLcB/s1600/50.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-HPTRsjqvNe4/WOEeL-DVxUI/AAAAAAAAAos/5HADhf7bGF8e3Q2DRU-LJ_zJoAwMdL64QCLcB/s1600/50.png" /></a></div>
</li>
<li>In the pipeline batch summary you should see messages like the following:<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-cI_MIT7hsoM/WOEeZnJPlCI/AAAAAAAAAow/2G78JmQxYyE6P0gfhbY8YXD3jub2yrpiwCLcB/s1600/51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-cI_MIT7hsoM/WOEeZnJPlCI/AAAAAAAAAow/2G78JmQxYyE6P0gfhbY8YXD3jub2yrpiwCLcB/s1600/51.png" /></a></div>
</li>
<li>In Content Tree, you see 26 items at <b>/sitecore/content/CD Catalog</b> location.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-P2dM-KQ8VGc/WOEer631CRI/AAAAAAAAAo0/r06HEr4wpFw0MA9bJq5SFfcKhhTBlbiPwCLcB/s1600/52.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-P2dM-KQ8VGc/WOEer631CRI/AAAAAAAAAo0/r06HEr4wpFw0MA9bJq5SFfcKhhTBlbiPwCLcB/s1600/52.png" /></a></div>
</li>
<li>Each CD Catalog item should have its fields populated. The following is an example of <b>Big Willie style</b> item.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-Nthp-iNQZww/WOEe3m9ufPI/AAAAAAAAAo4/H_QQ46gwVlUkvFxuqLe0sqqzOApDvafSACLcB/s1600/53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-Nthp-iNQZww/WOEe3m9ufPI/AAAAAAAAAo4/H_QQ46gwVlUkvFxuqLe0sqqzOApDvafSACLcB/s1600/53.png" /></a></div>
</li>
</ol>
<u><b>Note</b></u>:<br />
<ul style="text-align: left;">
<li>If you change the XML file and run the pipeline batch again, the Sitecore items will be updated.</li>
<li>If you remove a XML node <CD> from the XML File, the corresponding Sitecore item will not be deleted. We did not implement any logic to do this.</li>
<li>If we change the identifier value (Title field in our XML example) for an existing XML node <CD>, a new Sitecore item will be created.</li>
<li>In addition, the identifier value in the XML file must be unique. Duplicate identifiers will result in duplicate Sitecore items and not all of the duplicate Sitecore items will be synchronized.</li>
<li>If you change a field value on a Sitecore item, that value will be overwritten the next time the pipeline batch is run. In order for changes to the Sitecore item to result in the text file being updated, we must extend XML provider.</li>
<li>One thing that is important to realize is that this implementation is a very simple example and is by no means fool-proof. The code as it is would be useful in cases where you have control over the XML files that are provided. This provider might not work as expected if you have nested child nodes in XML document but you can extend the provider as per your requirement. Source code is already available on <a href="https://github.com/Dheer-Rajpoot/Sitecore.DataExchange.Providers.XMLSystem" rel="nofollow" target="_blank">GitHub</a>. </li>
<li>Sample test tenant Sitecore package can be downloaded from <a href="https://github.com/Dheer-Rajpoot/Sitecore.DataExchange.Providers.XMLSystem/blob/master/Sitecore.DataExchange.Providers.XML/Sitecore%20Package/Sample%20Test%20Tenant%20for%20XML%20Provider.zip" rel="nofollow" target="_blank">here</a>.</li>
<li>Provider is available on <a href="https://marketplace.sitecore.net/Modules/X/XML_Provider_for_Sitecore_Data_Exchange_Framework13.aspx?sc_lang=en" rel="nofollow" target="_blank">Sitecore Marketplace</a> as well. </li>
</ul>
Comments and suggestions are most welcome. Happy coding!
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-72574572621280991562017-04-02T18:59:00.002+05:302017-04-08T11:20:46.592+05:30XML provider for Sitecore Data Exchange Framework 1.3 - Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
Sitecore released the first version of Data Exchange Framework with Sitecore 8.2 initial release. Sitecore has already released three updates of Data exchange framework and Sitecore Data Exchange framework 1.3 is the latest release available.<br />
<br />
Data exchange framework allows you to the transfer the data between two systems. You can think of the Data Exchange Framework as standalone <b>ETL</b> (<b>Extract Transform Load</b>) tool that extracts data from the source system, transform it as appropriate and loads them into the target system. Sitecore can be one of the two systems - either the source or target but it is not mandatory. This framework can be used for exchanging data between any two independent systems. A typical example can be product sync between your ERP and a Digital Asset Management system using Data Exchange framework. Developers can build their own custom provider that allow 3rd party system to serve as source or target system.<br />
<br />
Documentation for data exchange is <a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/" rel="nofollow" target="_blank">available here</a> and steps for implementing a new provider is documented very well. Follow instructions from <a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/" rel="nofollow" target="_blank">Developer Guide</a> to build your own custom provider. After reading through the official documentation I thought it would be nice to create a working custom provider thus I have implemented XML System Provider for Data Exchange Framework. This provider reads XML data from file or web address and creates items into Sitecore. If you ever desired to extract daily hundreds of entries out of a XML stream and put into Sitecore then this XML provider for Data Exchange Framework can make your task easy.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-lX-2feHT_gw/WODzKRmJVEI/AAAAAAAAAkM/t0t8C4k_RNk_jOc84UUXnSjImx6_dvKxQCLcB/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-lX-2feHT_gw/WODzKRmJVEI/AAAAAAAAAkM/t0t8C4k_RNk_jOc84UUXnSjImx6_dvKxQCLcB/s1600/1.png" /></a></div>
I am using Data Exchange Framework 1.3 and Sitecore 8.2 Update 2 release. I’ve divided this topic into two blog posts:<br />
<ol style="text-align: left;">
<li><a href="http://www.bugdebugzone.com/2017/04/xml-provider-for-sitecore-data-exchange.html" target="_blank">Building XML Provider for Data Exchange Framework 1.3</a></li>
<li><a href="http://www.bugdebugzone.com/2017/04/xml-provider-for-sitecore-data-exchange_2.html" target="_blank">Use XML Provider for Data Exchange Framework 1.3</a></li>
</ol>
<h3 style="text-align: left;">
Configuring Data Exchange Framework 1.3
</h3>
<ol style="text-align: left;">
<li>Download <a href="https://dev.sitecore.net/Downloads/Data_Exchange_Framework/1x/Data_Exchange_Framework_1_3.aspx" rel="nofollow" target="_blank">Data Exchange Framework 1.3</a> Sitecore package and install it in your Sitecore 8.2 instance.</li>
<li>Download <a href="http://Sitecore Provider for Data Exchange Framework 1.3" rel="nofollow" target="_blank">Sitecore Provider for Data Exchange Framework 1.3</a> Sitecore package and install it in your Sitecore 8.2 instance.</li>
</ol>
<h3 style="text-align: left;">
Building XML provider for Data Exchange Framework 1.3</h3>
In this blog post I am not going to re-write the provided documentation, but will touch up high-level steps and configuration and provide the code I have written while playing with Data Exchange framework. The full source code of XML provider is located on <a href="https://github.com/Dheer-Rajpoot/Sitecore.DataExchange.Providers.XMLSystem" rel="nofollow" target="_blank">GitHub</a>. I strongly encourage you to follow official documentation step by step to build your own custom provider for Data Exchange framework.<br />
<ol style="text-align: left;">
<li>In Visual studio create a new “<b>Class library</b>” project using <b>.NET Framework version 4.5.2</b> </li>
<li>Add references to below three assemblies:<br />a. Sitecore.DataExchange<br />b. Sitecore.DataExchange.DataAccess<br />c. Sitecore.Services.Core</li>
<li><b>Add Template Folder</b> for XML Provider. Follow the steps mentioned here in <a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/implementing-a-provider/add-template-folder-for-provider.html" rel="nofollow" target="_blank">official documentation</a>.</li>
<li><a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/implementing-a-provider/implement-endpoint/add-endpoint-template.html" rel="nofollow" target="_blank"><b>Add Endpoint Template</b></a>. An endpoint represents a data source. The data source may support the ability to read data, to write data, or to both read and write data. The endpoint does not provide the ability to interact with the data source. It simply represents the data source.<br />Examples of endpoints are:<br /><br />a. URL for a web service used to read data from a CRM<br />b. Path to a directory used to read files<br />c. Connection string used to connect to a relational database<br /><br />I’ve created XML system endpoint which has below two fields: <br /><br /><u><b>XMLPath</b></u>: The path can be either a local XML file or a web address returning XML Data (http or https). <br /><u><b>Web Address Example</b></u>: <a href="https://www.w3schools.com/xml/cd_catalog.xml">https://www.w3schools.com/xml/cd_catalog.xml</a><br /><u><b>XMLNodeName</b></u>: Name of XML node which will be used to get a collection of matching nodes from XML Data. For example, <b>XMLNodeName </b>will be <b>CD </b>in below XML document:<br />
<pre><CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
</CATALOG>
</pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-HmrTp1E8OtE/WOD2j0qsWyI/AAAAAAAAAkY/w2zi0XIU4GYkXKfARkj5FyQUdhqB82grQCLcB/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-HmrTp1E8OtE/WOD2j0qsWyI/AAAAAAAAAkY/w2zi0XIU4GYkXKfARkj5FyQUdhqB82grQCLcB/s1600/2.png" /></a></div>
</li>
<li><b><a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/implementing-a-provider/implement-endpoint/implement-endpoint-settings-plugin.html" rel="nofollow" target="_blank">Implement Endpoint Settings Plugin</a></b>. The Endpoint settings class will store the configuration information once information is extracted from the Endpoint Sitecore item.<br /><br />
<script src="https://gist.github.com/Dheer-Rajpoot/a8292c8751ebb12af00432137789a5aa.js"></script>
<script src="https://gist.github.com/Dheer-Rajpoot/0e14e8177a5fbac216f0582cdf60eace.js"></script>
</li>
<li><a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/implementing-a-provider/implement-endpoint/implement-endpoint-converter.html" rel="nofollow" target="_blank"><b>Implement Endpoint Converter</b></a>. A converter is needed to convert a Sitecore item that represents a XML System endpoint into an endpoint component for Data Exchange Framework, and that adds the endpoint settings plugin to the endpoint component.<br /><br />
<script src="https://gist.github.com/Dheer-Rajpoot/1530211730bed1843ece3a43c5ab33d1.js"></script>
<script src="https://gist.github.com/Dheer-Rajpoot/03ddb34eb19f0b2206bf575a011fa8de.js"></script>
</li>
<li><a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/implementing-a-provider/implement-pipeline-step/add-pipeline-step-template.html" rel="nofollow" target="_blank"><b>Add Pipeline Step Template</b></a>. A pipeline step is needed to represent a logic involved with reading XML data from an endpoint and handling the data that is read. A template is needed to represent the pipeline step. It allows the pipeline step to be configured. </li>
<li><a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/implementing-a-provider/implement-pipeline-step/implement-pipeline-step-converter.html" rel="nofollow" target="_blank"><b>Implement Pipeline Step Converter</b></a>. A converter is needed to convert a Sitecore pipeline step into a pipeline step component for Data Exchange Framework, and that adds the settings configured on the pipeline step item using the appropriate plugin.<br /><br />
<script src="https://gist.github.com/Dheer-Rajpoot/7daf2356687c9563a5300fbb6ffb56b0.js"></script>
<script src="https://gist.github.com/Dheer-Rajpoot/9dfe06945b5abe1d1b79aa32775d34f3.js"></script>
</li>
<li><a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/implementing-a-provider/implement-pipeline-step/implement-pipeline-step-processor.html" rel="nofollow" target="_blank"><b>Implement Pipeline Step Processor</b></a>. A processor is needed to implement the business logic for the pipeline step.<br /><br />
<script src="https://gist.github.com/Dheer-Rajpoot/f258c85debc7429f7abed80c74d2c8af.js"></script>
</li>
<li><a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/implementing-a-provider/implement-data-access-components/add-value-accessor-template.html" rel="nofollow" target="_blank"><b>Add Value Accessor Template</b></a>. A value accessor is the component that is used to read a value (value reader) from a source object or write a value (value writer) to a target object.
<br /><style type="text/css">
table.tableizer-table {
border: 1px solid #CCC;
}
.tableizer-table td {
padding: 4px !important;
margin: 3px;
border: 1px solid #ccc;
}
.tableizer-table th {
background-color: #33A5D7;
color: #FFF;
font-weight: bold;
padding: 4px !important;
}
</style><br />
<table class="tableizer-table">
<tbody>
<tr class="tableizer-firstrow"><th>Data Exchange Framework</th><th>C#</th></tr>
<tr><td>Value accessor</td><td>Property</td></tr>
<tr><td>Value reader</td><td>Property getter</td></tr>
<tr><td>Value writer</td><td>Property setter</td></tr>
</tbody></table>
<b>A value reader</b> is a component that is able to read a value from the source object. For example, if the source object represents a XML node (<b><CD></b>) from XML document, you might want to read the value of any specific XML element or field (e.g.: <b>TITLE </b>or <b>ARTIST</b>).
<pre><CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
</pre>
<br />
<script src="https://gist.github.com/Dheer-Rajpoot/4cd13d6f72bb38cbc76c0de0f412f041.js"></script>
A value writer is a component that is able to write a value to the target object. Being able to write values is an essential part of mapping values from the source object to the target object.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-WTqsUfXUHxw/WOD7mqAWbNI/AAAAAAAAAko/t85kt_DhFv02bQkHOOlzlxCbMWUsr9TmgCLcB/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-WTqsUfXUHxw/WOD7mqAWbNI/AAAAAAAAAko/t85kt_DhFv02bQkHOOlzlxCbMWUsr9TmgCLcB/s1600/3.png" /></a></div>
</li>
<li><a href="http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/implementing-a-provider/implement-data-access-components/implement-value-accessor-converter.html" rel="nofollow" target="_blank"><b>Implement Value Accessor Converter</b></a>. A converter is needed to convert a Sitecore value accessor item into a value accessor component for Data Exchange Framework.<br /><br />
<script src="https://gist.github.com/Dheer-Rajpoot/a8bee1fe02c431f99d3f8064de4c2e1d.js"></script>
<script src="https://gist.github.com/Dheer-Rajpoot/4c5abc789f93cc5404714cf178fa51ef.js"></script>
</li>
</ol>
In <a href="http://www.bugdebugzone.com/2017/04/xml-provider-for-sitecore-data-exchange_2.html" target="_blank">next blog post</a>, I’ll explain how to use XML provider for Data Exchange Framework 1.3. Comments and suggestions are most welcome. Happy coding! </div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-44571855852666897902017-03-08T22:24:00.001+05:302017-03-08T22:24:47.768+05:30Sitecore Experience Editor : Save button is disabled<div dir="ltr" style="text-align: left;" trbidi="on">
Recently I was involved in Sitecore 8.1 upgradation project and stumbled upon into a situation where save button was disabled in Experience Editor. I’d made text changes into many fields but save button was greyed out and was not allowing to save the text changes.<br />
<br />
During troubleshooting, I’ve found that below error was appearing in web browser console:
<br />
<div class="message_box warning">
TypeError: saveButtonState.onchange is not a function.</div>
It seems the JavaScript used by Sitecore in edit mode and the JavaScript files in the webpage are conflicting somehow. When using the Experience Editor for editing pages that utilize the jQuery JavaScript library, editing might not function properly and few errors may occur. This can happen because the Prototype JavaScript library used by the Experience Editor may conflict with jQuery utilized by the page and cause the browser to interpret Prototype calls as jQuery ones. Prototype.js plug-in is also using the $ as the global variable.<br />
<br />
To avoid editing issues in Experience Editor use jQuery JavaScript library in the No-Conflict mode. I’ve added below code in layout page to avoid conflict in the page editor mode.
<br />
<pre>@if (Sitecore.Context.PageMode.IsPageEditor)
{
<script>$.noConflict();</script>
}</pre>
Comments and suggestions are most welcome. Happy coding!
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-9878680716742126012017-02-26T12:08:00.002+05:302017-02-26T12:14:44.301+05:30Part 4: Sitecore 8.2 with SOLR 6.2<div dir="ltr" style="text-align: left;" trbidi="on">
Hello, Sitecore enthusiasts! This is the fourth article of <a href="http://www.bugdebugzone.com/2016/11/part-1-sitecore-82-with-solr-62.html" rel="nofollow" target="_blank">Sitecore 8.2 with Solr 6.2 blog series</a>.<br />
<h2 style="text-align: left;">
Create a custom SOLR Core for custom search index</h2>
<ol style="text-align: left;">
<li>Copy the sitecore_configs (<b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr\configsets\sitecore_configs</b>) folder and paste it in <b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr</b>. Rename it to the <b>sitecore_custom_master_index</b>. Refer to <a href="http://www.bugdebugzone.com/2016/11/part-2-sitecore-82-with-solr-62.html" rel="nofollow" target="_blank">this blog post</a> for more information.</li>
<li>Navigate to the Solr admin page.</li>
<li>After login, navigate to Core Admin page and click on <b>"Add Core"</b> button.<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-VUQwuPDHh7o/WLJqs6DWpfI/AAAAAAAAAjY/DTsOWUw6HOE-uAUIYvgqX3p4D9RbVKZqgCLcB/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-VUQwuPDHh7o/WLJqs6DWpfI/AAAAAAAAAjY/DTsOWUw6HOE-uAUIYvgqX3p4D9RbVKZqgCLcB/s1600/1.png" /></a></div>
</li>
<li>Fill in the <b>'name'</b> and <b>'instanceDir'</b> fields with <b>sitecore_custom_master_index</b>, and press the <b>"Add Core"</b> button to add the core into Solr. </li>
<li>You should be able to see that <b>sitecore_custom_master_index</b> core is now present in the list of cores available in your Solr instance.<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-KVAjItS9tgs/WLJrrhXa1OI/AAAAAAAAAjc/VIsW3f5UYj0QO-v1fTutQPPersRQnLHgQCLcB/s1600/2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-KVAjItS9tgs/WLJrrhXa1OI/AAAAAAAAAjc/VIsW3f5UYj0QO-v1fTutQPPersRQnLHgQCLcB/s1600/2.bmp" /></a></div>
</li>
<li>Repeat above steps and add a new core <b>sitecore_custom_web_index</b>.</li>
</ol>
<h2 style="text-align: left;">
Create custom index configuration file for custom SOLR core</h2>
<ol style="text-align: left;">
<li>In our Sitecore project we should first add a custom .config file for our custom SOLR Core. Navigate to <b>/App_Config/Include/</b> folder and add a new config file and name it as <b>Sitecore.ContentSearch.Solr.Index.Custom.Master.config</b>.</li>
<li>Copy configuration contents from config file <b>Sitecore.ContentSearch.Solr.Index.Master</b> and paste it in newly created config file <b>Sitecore.ContentSearch.Solr.Index.Custom.Master.config</b>. </li>
<li>Open <b>Sitecore.ContentSearch.Solr.Index.Custom.Master.config</b> file and make below changes:
<ul>
<li><u><b>Index Id</b></u> : Index should be the same as it is in SOLR
<pre><index id="<span style="background-color: yellow;">sitecore_custom_master_index</span>" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider"></pre>
</li>
<li><u><b>Configuration</b></u> : We’ll need an additional configuration file inside our project for new custom core. This configuration will connect our Sitecore Item and SOLR during rebuilding of indexes. All settings from this configuration file will be taken in during that process. Within the configuration file, you can specify new fields types and computed fields.
<pre><configuration ref="contentSearch/indexConfigurations/<span style="background-color: yellow;">customSolrIndexConfiguration</span>" /></pre>
</li>
<li><u><b>Strategies</b></u> : Here you can specify indexing update strategy.</li>
<li><b><u>Database</u> : </b>Database which we want to crawl.<pre><Database>master</Database></pre>
</li>
<li><b><u>Root</u></b> : Content root path from where we want to crawl.
<pre><Root>/sitecore</Root></pre>
</li>
</ul>
</li>
<li>Repeat above steps for <b>sitecore_custom_web_index</b>. Update index id as <b>sitecore_custom_web_index</b> and database as <b>web </b>in <b>Sitecore.ContentSearch.Solr.Index.Custom.Web.config</b> file.</li>
<li>We have to create an additional configuration file inside our project for new custom core. Duplicate config file <b>Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config</b> and rename it as <b>Sitecore.ContentSearch.Solr.CustomIndexConfiguration.config</b>. Rename <b><defaultSolrIndexConfiguration></b> as <b><customSolrIndexConfiguration></b> in configuration file. We can define which templates we want to include in our index, we can add a custom computed field into our index and connect it to a class inside our project. There are a lot of settings in this file and you should customize them to your needs.
<script src="http://gist.github.com/Dheer-Rajpoot/c3ecb27da801735aed751b902c5e61ae.js"></script>
</li>
<li>The last step is to rebuild our custom index in Sitecore’s Index Manager. Go to Control Panel -> Indexing Manager and rebuild <b>sitecore_custom_master_index</b> and <b>sitecore_custom_web_index</b>.</li>
</ol>
<h2 style="text-align: left;">
Key Content Search Settings</h2>
Below are the several key settings which you should be aware of when using the Sitecore Content Search layer:
<br />
<ol style="text-align: left;">
<li><u><b>ContentSearch.SearchMaxResults</b></u> : This controls how many documents are returned to Sitecore when it queries Solr. The default is 500 documents which is plenty. Know that requests to Solr are made over HTTP, therefore the more requests you receive, the larger the response payload will be.</li>
<li><u><b>ContentSearch.Solr.ServiceBaseAddress</b></u> : This points to Solr, you should be able to take the value of this setting, paste it in a browser and get directly to Solr.</li>
<li><u><b>ContentSearch.Update.BatchModeEnabled</b></u> : Enabling this will certainly help committing documents to Solr when you are rebuilding or updating an index.</li>
<li><u><b>ContentSearch.Update.BatchSize</b></u> : This is used when the above setting is set to true.</li>
<li><u><b>ContentSearch.EnableSearchDebug</b></u> : Set this to true while you are debugging your search queries. You will also need to make sure log4net is also set to at least DEBUG.</li>
</ol>
<h2 style="text-align: left;">
Multiple Solr cores</h2>
<div style="text-align: left;">
For optimal performance Sitecore recommends that you always use multiple cores for your indexes. If you store all indexes in the same core, when you update an index the contents of all the other indexes in the same core are also cleared. As it is possible to rebuild indexes individually, some indexes will be left empty after rebuild. If you store each default index in a separate Solr core the names of these cores should match the names of the Sitecore indexes. </div>
<div class="message_box note">
Multiple Solr cores may improve the performance of your search and indexing. For example, you should use separate cores for each index in a production environment and only share indexes on a single core in a development environment. The <a href="https://lucene.apache.org/solr/" rel="nofollow" target="_blank">Solr website</a> provides more detailed guidance and advice when configuring Solr.
</div>
<u><b>Related read</b></u><b>:</b><br />
<ul style="text-align: left;">
<li><a href="https://allthingssitecore.com/2015/10/01/solr-sitecore-config-what-does-this-all-mean/" rel="nofollow" target="_blank">Solr Sitecore Config – What does this all mean?</a> </li>
</ul>
Comments and suggestions are most welcome. Happy coding!
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-90773257028968142862016-11-19T20:24:00.001+05:302016-11-19T20:24:15.740+05:30Error: The Command InsertSitecoreBucketLink is not implemented yet<div dir="ltr" style="text-align: left;" trbidi="on">
Recently I’ve faced strange issue while working with Sitecore 8.1 update 3 solution. I was unable to insert bucket link while working with RTE. I was getting an error message as "<b>The Command InsertSitecoreBucketLink is not implemented yet</b>". The Same error was occurring on vanilla Sitecore 8.1 update 3 solution as well.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-KYVpNG_dHqc/WDBmuQAgCGI/AAAAAAAAAPc/jMBF1bTrQzoF4Mptn22nUqEaDukH3VplwCLcB/s1600/1.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="https://4.bp.blogspot.com/-KYVpNG_dHqc/WDBmuQAgCGI/AAAAAAAAAPc/jMBF1bTrQzoF4Mptn22nUqEaDukH3VplwCLcB/s640/1.bmp" width="640" /></a></div>
<br />
I’ve created a support ticket with Sitecore support team and they have registered the described issue as a bug in the Sitecore 8.1 update 3 version. To resolve the issue, they have provided a hotfix patch. Reach out to Sitecore support and use the <b>reference number 107388</b> to get the required files. Below are the steps to apply the patch:
<ol style="text-align: left;">
<li>Put the attached Sitecore.Support.107388.dll assembly into the \bin folder.</li>
<li>Back up the \sitecore\shell\Applications\Buckets\MiniResults.aspx file and replace it with the attached one.</li>
<li>Back up the \sitecore\shell\Controls\Rich Text Editor\RichText Commands.js file and replace it with the attached one.</li>
<li>Clear your browser cache.</li>
</ol>
Note: This issue is present with Sitecore 8.2 initial release as well.<br />
<br />
Comments and suggestions are most welcome. Happy coding! <br />
<div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/06805062278321133735noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-46506259619512502002016-11-15T12:18:00.000+05:302016-11-15T12:18:50.853+05:30Part 3: Sitecore 8.2 with SOLR 6.2<div dir="ltr" style="text-align: left;" trbidi="on">
Hello, Sitecore enthusiasts! This is the third article of <a href="http://www.bugdebugzone.com/2016/11/part-1-sitecore-82-with-solr-62.html" target="_blank">Sitecore 8.2 with Solr 6.2 blog series</a>.<br />
<h2 style="text-align: left;">
Configuring Sitecore to work with our Solr instance</h2>
<div>
With Sitecore 8.2, search and indexing no longer require a third-party DI container to enable Solr and there is no need to install a Solr support package. </div>
<h3 style="text-align: left;">
Disable Lucene Config File</h3>
<div>
Make sure all Lucene search related configuration files are disabled and Solr search configuration files are enabled. Follow below steps to switch configuration files so that Solr is enabled and Lucene is disabled: </div>
<div>
<ol style="text-align: left;">
<li>Navigate to the website Include folder: <b>\Website\App_Config\Include\ </b>and disable the following Lucene configuration files by adding .disabled to the file name extension:</li>
<ul>
<li>Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config</li>
<li>Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.Xdb.config</li>
<li>Sitecore.ContentSearch.Lucene.Index.Analytics.config</li>
<li>Sitecore.ContentSearch.Lucene.Index.Core.config</li>
<li>Sitecore.ContentSearch.Lucene.Index.Master.config</li>
<li>Sitecore.ContentSearch.Lucene.Index.Web.config</li>
<li>Sitecore.ContentSearch.Lucene.Indexes.Sharded.Core.config</li>
<li>Sitecore.ContentSearch.Lucene.Indexes.Sharded.Master.config</li>
<li>Sitecore.ContentSearch.Lucene.Indexes.Sharded.Web.config</li>
<li>Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Lucene.Index.Master.config</li>
<li>Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Lucene.Index.Web.config</li>
<li>Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Lucene.IndexConfiguration.config</li>
<li>Sitecore.Marketing.Lucene.Index.Master.config</li>
<li>Sitecore.Marketing.Lucene.Index.Web.config</li>
<li>Sitecore.Marketing.Lucene.IndexConfiguration.config</li>
<li>Sitecore.Speak.ContentSearch.Lucene.config</li>
</ul>
<li>Navigate to<b> \Website\App_Config\Include\FXM</b> and disable the following Lucene configuration files by adding .disabled to the file name extension:</li>
<ul>
<li>Sitecore.FXM.Lucene.DomainsSearch.DefaultIndexConfiguration.config</li>
<li>Sitecore.FXM.Lucene.DomainsSearch.Index.Master.config</li>
<li>Sitecore.FXM.Lucene.DomainsSearch.Index.Web.config</li>
</ul>
<li>Navigate to <b>\Website\App_Config\Include\ListManagement</b> and disable the following Lucene configuration files by adding .disabled to the file name extension:</li>
<ul>
<li>Sitecore.ListManagement.Lucene.Index.List.config</li>
<li>Sitecore.ListManagement.Lucene.IndexConfiguration.config</li>
</ul>
<li>Navigate to <b>\Website\App_Config\Include\Social</b> and disable the following Lucene configuration files by adding .disabled to the file name extension:</li>
<ul>
<li>Sitecore.Social.Lucene.Index.Analytics.Facebook.config</li>
<li>Sitecore.Social.Lucene.Index.Master.config</li>
<li>Sitecore.Social.Lucene.Index.Web.config</li>
<li>Sitecore.Social.Lucene.IndexConfiguration.config</li>
</ul>
<li>Navigate to <b>\Website\App_Config\Include\ContentTesting</b> and disable the following Lucene configuration files by adding .disabled to the file name extension:</li>
<ul>
<li>Sitecore.ContentTesting.Lucene.IndexConfiguration.config</li>
</ul>
</ol>
</div>
<h3 style="text-align: left;">
Enable Solr Config File</h3>
<div>
<ol style="text-align: left;">
<li>Enable the <b>Sitecore.ContentSearch.Solr.*.config</b> files by removing .example/.disabled from the file name. Configuration file extension should be .config.</li>
<ul>
<li>Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config</li>
<li>Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.Xdb.config</li>
<li>Sitecore.ContentSearch.Solr.Index.Analytics.config</li>
<li>Sitecore.ContentSearch.Solr.Index.Core.config</li>
<li>Sitecore.ContentSearch.Solr.Index.Master.config</li>
<li>Sitecore.ContentSearch.Solr.Index.Web.config</li>
<li>Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Solr.Index.Master.config</li>
<li>Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Solr.Index.Web.config</li>
<li>Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Solr.IndexConfiguration.config</li>
<li>Sitecore.Marketing.Solr.Index.Master.config</li>
<li>Sitecore.Marketing.Solr.Index.Web.config</li>
<li>Sitecore.Marketing.Solr.IndexConfiguration.config</li>
<li>Sitecore.Speak.ContentSearch.Solr.config</li>
</ul>
<li>Navigate to<b> \Website\App_Config\Include\FXM</b> and enable below configuration files by removing .example/.disabled from the file name:</li>
<ul>
<li>Sitecore.FXM.Solr.DomainsSearch.DefaultIndexConfiguration.config</li>
<li>Sitecore.FXM.Solr.DomainsSearch.Index.Master.config</li>
<li>Sitecore.FXM.Solr.DomainsSearch.Index.Web.config</li>
</ul>
<li>Navigate to <b>\Website\App_Config\Include\ListManagement </b>and enable below configuration files by removing .example/.disabled from the file name:</li>
<ul>
<li>Sitecore.ListManagement.Solr.Index.List.config</li>
<li>Sitecore.ListManagement.Solr.IndexConfiguration.config</li>
</ul>
<li>Navigate to <b>\Website\App_Config\Include\Social</b> and and enable below configuration files by removing .example/.disabled from the file name:</li>
<ul>
<li>Sitecore.Social.Solr.Index.Master.config</li>
<li>Sitecore.Social.Solr.Index.Web.config</li>
<li>Sitecore.Social.Solr.IndexConfiguration.config</li>
</ul>
<li>Navigate to \Website\App_Config\Include\ContentTesting and and enable below configuration files by removing .example/.disabled from the file name:</li>
<ul>
<li>Sitecore.ContentTesting.Solr.IndexConfiguration.config</li>
</ul>
</ol>
</div>
<h3 style="text-align: left;">
Configure Solr specific settings in configuration file:</h3>
<div>
Open <b>Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config</b> file and update below settings:</div>
<div>
<ol style="text-align: left;">
<li>Specifying a Solr Service Address: This is the base url of Solr server. Update this accordingly.</li>
<pre><setting name="ContentSearch.Solr.ServiceBaseAddress" value="http://localhost:8090/solr" /></pre>
<li>Enabling a Search Provider: This setting tells that which provider is currently being used. Enable the Solr as below:</li>
<pre><setting name="ContentSearch.Provider" value="Solr" /></pre>
</ol>
</div>
<h3 style="text-align: left;">
Rebuild search index</h3>
<div>
Perform below steps to rebuild the Sitecore search indexes:</div>
<div>
<ol style="text-align: left;">
<li>In the <b>Control Panel</b>, and click <b>Indexing manager</b>.<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-xrQNlUHjk9U/WCqtuNVuC3I/AAAAAAAAAO4/EDDuxBnqV4ghaF86h7JGJD0RbpE4-wEHwCLcB/s1600/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-xrQNlUHjk9U/WCqtuNVuC3I/AAAAAAAAAO4/EDDuxBnqV4ghaF86h7JGJD0RbpE4-wEHwCLcB/s1600/1.png" /></a></div>
</li>
<li>Click <b>Select all</b>, and then click <b>Rebuild</b>.<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-xtgKQ0iGh0A/WCquJxZUjzI/AAAAAAAAAO8/TFD4fdNyLOENDJXHpmKuXpfQTEmmCghMgCLcB/s1600/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-xtgKQ0iGh0A/WCquJxZUjzI/AAAAAAAAAO8/TFD4fdNyLOENDJXHpmKuXpfQTEmmCghMgCLcB/s1600/2.png" /></a></div>
</li>
<li>Indexes should be rebuilt without error.<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-dLouIcGRsnQ/WCquTFbPtmI/AAAAAAAAAPA/bs9G2WN5mn0D040Yr-Zyvd2rZJb6XB5wQCLcB/s1600/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-dLouIcGRsnQ/WCquTFbPtmI/AAAAAAAAAPA/bs9G2WN5mn0D040Yr-Zyvd2rZJb6XB5wQCLcB/s1600/3.png" /></a></div>
</li>
</ol>
</div>
That's it! Sitecore and Solr are configured now. In upcoming blog posts, I'll cover few common search techniques or functionalities using Solr as search provider. Comments and suggestions are most welcome. Happy coding!</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com1Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-29662162718504895682016-11-11T15:49:00.001+05:302017-02-25T21:52:10.923+05:30Part 2: Sitecore 8.2 with SOLR 6.2<div dir="ltr" style="text-align: left;" trbidi="on">
Hello, Sitecore enthusiasts! This is the second article of <a href="http://www.bugdebugzone.com/2016/11/part-1-sitecore-82-with-solr-62.html" target="_blank">Sitecore 8.2 with Solr 6.2 blog series</a>.<br />
<h2 style="text-align: left;">
Configuring Solr to use with Sitecore</h2>
<h3 style="text-align: left;">
Generate an XML Schema for Solr</h3>
<div>
Solr needs a defined XML schema when working with documents. Follow below steps to generate Solr Schema XML file:</div>
<div>
<ol style="text-align: left;">
<li>Duplicate <b>basic_configs</b> folder under <b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr\configsets</b> and rename duplicated folder as <b>sitecore_configs</b>.<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-piAl_cXcO4U/WCWUD9bXv7I/AAAAAAAAAN0/62Fsr1V2IKQWswlqIQNyylIaSbHAh0l4ACLcB/s1600/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-piAl_cXcO4U/WCWUD9bXv7I/AAAAAAAAAN0/62Fsr1V2IKQWswlqIQNyylIaSbHAh0l4ACLcB/s1600/1.png" /></a></div>
</li>
<li>Verify that that you have a file named <b>schema.xml</b> under the <b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr\configsets\sitecore_configs\conf </b>folder. If you don't have a schema.xml file under the folder then you will need to perform below extra steps, as explained in <a href="https://kb.sitecore.net/articles/227897#note2" rel="nofollow" target="_blank">solution 2 of the Solr Compatibility Table</a>:<br />
<ul>
<li>Create schema.xml file by duplicating and renaming the <b>managed-schema</b> file present in <b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr\configsets\sitecore_configs\conf</b> folder</li>
<li>Switch to <b>ClassicIndexSchemaFactory </b>by adding the following line in the end to the <b>SolrConfig.xml</b> file present in <b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr\configsets\sitecore_configs\conf</b> folder: <pre><schemaFactory class="ClassicIndexSchemaFactory" /></pre>
</li>
</ul>
</li>
<li>Open <b>schema.xml</b> file and make the following changes:<ul>
<li>
<span style="white-space: pre;"> </span>Enclose all <b><field></b> and <b><dynamicField></b> elements in a <b><fields></b> tag.</li>
<li><span style="white-space: pre;"> </span>Enclose all <b><fieldType></b> elements in a <b><types></b> tag.</li>
</ul>
</li>
<li>Save <b>schema.xml</b> and also create a backup file of schema.xml.</li>
<li>Log into your Sitecore instance.</li>
<li>Navigate to Sitecore Control Panel.</li>
<li>In the Control Panel, click <b>Generate the Solr Schema.xml file</b> link in Index section.<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-PQN8psIjup0/WCWVonELs4I/AAAAAAAAAN8/3rhty-OkqBoE9cwgM6mrdewmJeqjlTySgCLcB/s1600/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-PQN8psIjup0/WCWVonELs4I/AAAAAAAAAN8/3rhty-OkqBoE9cwgM6mrdewmJeqjlTySgCLcB/s1600/2.png" /></a></div>
</li>
<li>In the dialog window, change the source file and target file to point to the newly created schema file (<b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr\configsets\sitecore_configs\conf\schema.xml</b>) and click the ‘<b>Generate</b>’ button.<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-OmhXwglKNks/WCWV6GS6S5I/AAAAAAAAAOA/xk5oShHDCr8B3obt1UJGuS0F6U1JsmjYgCLcB/s1600/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-OmhXwglKNks/WCWV6GS6S5I/AAAAAAAAAOA/xk5oShHDCr8B3obt1UJGuS0F6U1JsmjYgCLcB/s1600/3.png" /></a></div>
</li>
<li>Sitecore will create a modified <b>schema.xml</b> file, using the schema.xml file we created as a baseline in above steps and add all its necessary Solr specific fields needed for indexing, unique keys etc. <div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-OYPHe3SZLL8/WCWWJp6bSqI/AAAAAAAAAOE/48oJIRETBJc6nCYf0SjzWP_IyqJRrNlsACLcB/s1600/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-OYPHe3SZLL8/WCWWJp6bSqI/AAAAAAAAAOE/48oJIRETBJc6nCYf0SjzWP_IyqJRrNlsACLcB/s1600/4.png" /></a></div>
</li>
<li>Open the newly generated schema file (<b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr\configsets\sitecore_configs\conf\schema.xml</b>) and add below line: <pre><fieldType name="pint" class="solr.TrieIntField" docValues="true" precisionStep="0" positionIncrementGap="0" /></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-WQ51sIPCfjs/WCWWcElcJvI/AAAAAAAAAOI/HLKFByyOuiIPF6ziVnjckyEXLB-qcudDwCLcB/s1600/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-WQ51sIPCfjs/WCWWcElcJvI/AAAAAAAAAOI/HLKFByyOuiIPF6ziVnjckyEXLB-qcudDwCLcB/s1600/5.png" /></a></div>
</li>
</ol>
<h3 style="text-align: left;">
Organize Solr core structure</h3>
</div>
<ol style="text-align: left;">
<li>Copy the sitecore_configs (<b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr\configsets\sitecore_configs</b>) folder and paste it in <b>C:\Bitnami\solr-6.2.1-2\apache-solr\server\solr</b>. Rename it to the <b>sitecore_web_index.</b></li>
<li>For each Sitecore index, we need to repeat above step 1 until we have a set of config directories with the following names:</li>
<ul>
<li>sitecore_web_index</li>
<li>sitecore_master_index</li>
<li>sitecore_core_index</li>
<li>sitecore_analytics_index</li>
<li>social_messages_web</li>
<li>social_messages_master</li>
<li>sitecore_marketing_asset_index_master</li>
<li>sitecore_marketing_asset_index_web</li>
<li>sitecore_testing_index</li>
<li>sitecore_suggested_test_index</li>
<li>sitecore_fxm_master_index</li>
<li>sitecore_fxm_web_index</li>
<li>sitecore_list_index</li>
<li>sitecore_marketingdefinitions_master</li>
<li>sitecore_marketingdefinitions_web</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-PojNu8zsEUw/WCWXWS8HmVI/AAAAAAAAAOM/xydluJi_duIy2jQAL_uSzcLc3xV85vzDACLcB/s1600/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-PojNu8zsEUw/WCWXWS8HmVI/AAAAAAAAAOM/xydluJi_duIy2jQAL_uSzcLc3xV85vzDACLcB/s1600/6.png" /></a></div>
<li>Once you have configured all the directories, navigate to the Solr admin page.</li>
<li>After login, navigate to Core Admin page and click on Add Core button.<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-Y5YnUDkXBEM/WCWXuSLD15I/AAAAAAAAAOU/A5ogCNlF70YugCIERILtaQh9BbAUabtZgCLcB/s1600/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-Y5YnUDkXBEM/WCWXuSLD15I/AAAAAAAAAOU/A5ogCNlF70YugCIERILtaQh9BbAUabtZgCLcB/s1600/7.png" /></a></div>
</li>
<li>Fill in the '<b>name</b>' and '<b>instanceDir</b>' fields with <b>sitecore_web_index</b>, and press the "<b>Add Core</b>" button to add the core into Solr. </li>
<li>You should be able to see that <b>sitecore_web_index</b> core is now present in the list of cores available in your Solr instance.<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-o5qjSL0eZyw/WCWYCXbm75I/AAAAAAAAAOY/uxP9r9OP4JIu8uxMu5yGZYz9RwfyfdXcgCLcB/s1600/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-o5qjSL0eZyw/WCWYCXbm75I/AAAAAAAAAOY/uxP9r9OP4JIu8uxMu5yGZYz9RwfyfdXcgCLcB/s1600/8.png" /></a></div>
</li>
<li>Repeat these steps for all directories created earlier so that we'll have a Solr core for each directory we created.<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-Uov9MvwVtw0/WCWYZhGn7uI/AAAAAAAAAOc/816nJI7q8AA0dnIdQrG9QQQMeSH_P2g0gCLcB/s1600/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-Uov9MvwVtw0/WCWYZhGn7uI/AAAAAAAAAOc/816nJI7q8AA0dnIdQrG9QQQMeSH_P2g0gCLcB/s1600/9.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
</li>
</ol>
That's it! Solr is ready to be used with Sitecore. Comments and suggestions are most welcome. Happy coding!</div>
Anonymoushttp://www.blogger.com/profile/06805062278321133735noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-15889533666223680862016-11-11T13:23:00.000+05:302017-02-26T12:18:13.376+05:30Part 1: Sitecore 8.2 with SOLR 6.2<div dir="ltr" style="text-align: left;" trbidi="on">
Hello, Sitecore enthusiasts! As you may be already aware that Lucene is the default search provider for Sitecore though Solr is recommended search provider in scaled environments. I’ll be writing series of blog posts related to Sitecore search implementation with Solr. I’ll be covering how to setup Solr 6.2 with Sitecore 8.2 instance and few common search techniques or functionalities using Solr as search provider. This is part 1 of Sitecore 8.2 search with Solr 6.2 blog posts series. I am working with Sitecore 8.2 initial release.<br />
<ol style="text-align: left;">
<li><a href="http://www.bugdebugzone.com/2016/11/part-1-sitecore-82-with-solr-62.html" target="_blank">Part 1: Installing Solr using the Bitnami Apache Solr Stack</a></li>
<li><a href="http://www.bugdebugzone.com/2016/11/part-2-sitecore-82-with-solr-62.html" target="_blank">Part 2: Configuring Solr to use with Sitecore</a></li>
<li><a href="http://www.bugdebugzone.com/2016/11/part-3-sitecore-82-with-solr-62.html" target="_blank">Part 3: Configuring Sitecore to work with Solr</a></li>
<li><a href="http://www.bugdebugzone.com/2017/02/part-4-sitecore-82-with-solr-62.html" target="_blank">Part 4: Create a custom Solr Core</a></li>
<li>Part 5: Work in progress </li>
</ol>
<h2 style="text-align: left;">
Installing Solr using the Bitnami Apache Solr Stack</h2>
<div>
<ol style="text-align: left;">
<li>Download the <a href="https://bitnami.com/stack/solr" rel="nofollow">Bitnami Apache Solr Stack Distribution</a> that provides a one-click install solution for Apache Solr.</li>
<li>Double-click on the installer (bitnami-solr-6.2.1-2-windows-installer.exe for the purposes of this article). The first screen will look like below:<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-a_lLsWO90Wc/WCVwrAigplI/AAAAAAAAAMY/nUwBoa7AL0ASlhq-dJA2gPdWbmL92z_egCLcB/s1600/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-a_lLsWO90Wc/WCVwrAigplI/AAAAAAAAAMY/nUwBoa7AL0ASlhq-dJA2gPdWbmL92z_egCLcB/s1600/1.png" /></a></div>
</li>
<li>Click <b>Next</b>. In next screen, you should choose the folder to install Bitnami Apache Solr Stack. For this blog post, I am taking default installation path C:\Bitnami\solr-6.2.1-2<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-BuBYSOOyXSs/WCVxIQEJXuI/AAAAAAAAAMc/CypLHvQaXDIjCtwccGOQpfismvYtQsL4QCLcB/s1600/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-BuBYSOOyXSs/WCVxIQEJXuI/AAAAAAAAAMc/CypLHvQaXDIjCtwccGOQpfismvYtQsL4QCLcB/s1600/2.png" /></a></div>
</li>
<li>Click <b>Next</b>. In next screen, you should create an administrator account for Bitnami Apache Solr Stack.<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-jiaERHoXJeA/WCVxIYG_55I/AAAAAAAAAMg/JiiDMnHz-FAf74uGsv_eZmlukzRrj88OwCEw/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-jiaERHoXJeA/WCVxIYG_55I/AAAAAAAAAMg/JiiDMnHz-FAf74uGsv_eZmlukzRrj88OwCEw/s1600/3.png" /></a></div>
</li>
<li>Click <b>Next</b>. Next screen allows you to define the port that Apache Solr should run on. Choose a port which is not currently in use. For this article, we used port 8090.<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-nN7d0L13ykc/WCVy9KQTBtI/AAAAAAAAAMw/QwEW5yOslPE6XtPVp6CkM-CWexlM88ijQCLcB/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-nN7d0L13ykc/WCVy9KQTBtI/AAAAAAAAAMw/QwEW5yOslPE6XtPVp6CkM-CWexlM88ijQCLcB/s1600/4.png" /></a></div>
</li>
<li>Click <b>Next</b>. Next screen shows offering up details about Bitnami Cloud Hosting. For this tutorial, I’ll make it uncheck.<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-4TLbAeT_zl8/WCVzIU3pCvI/AAAAAAAAAM8/XDPBybPaSXQ0XIDh9YIugx6ET0dkN1pXACLcB/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-4TLbAeT_zl8/WCVzIU3pCvI/AAAAAAAAAM8/XDPBybPaSXQ0XIDh9YIugx6ET0dkN1pXACLcB/s1600/5.png" /></a></div>
</li>
<li>Click <b>Next</b>. Setup is now ready to begin installing Bitnami Apache Solr Stack on your computer.<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-BXxFIy8XnnU/WCVzoED245I/AAAAAAAAANA/Rz-DnyaYXNI9nAH10HwEv6przFF_WNUzgCLcB/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-BXxFIy8XnnU/WCVzoED245I/AAAAAAAAANA/Rz-DnyaYXNI9nAH10HwEv6przFF_WNUzgCLcB/s1600/6.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-Y0kT_iJpsjc/WCVzuQgJ7oI/AAAAAAAAANE/LREmkr2MFgY8ccI-mIh-Q47w0xeo3nDAwCEw/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-Y0kT_iJpsjc/WCVzuQgJ7oI/AAAAAAAAANE/LREmkr2MFgY8ccI-mIh-Q47w0xeo3nDAwCEw/s1600/7.png" /></a></div>
</li>
<li>During the installation, Windows Firewall will alert you that it has blocked some features of this installation. Ensure that the check boxes for Domain networks, such as a workplace network and Private networks, such as my home or work network are checked. Complete this step by clicking the <b>Allow </b>access button.<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-LXw7zRov88E/WCV0QKr2SkI/AAAAAAAAANI/f65vrDL6k8MBbLuk6ulZPFhgEEjOPPX-wCLcB/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-LXw7zRov88E/WCV0QKr2SkI/AAAAAAAAANI/f65vrDL6k8MBbLuk6ulZPFhgEEjOPPX-wCLcB/s1600/8.png" /></a></div>
</li>
<li>Once the installation is complete, leave the check box checked and click on <b>Finish </b>button.<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-PAJXDF35cvk/WCV0gVzYrGI/AAAAAAAAANM/FspdQY6HqKAORRD1yt9pDE4wPjAjQc-sgCLcB/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-PAJXDF35cvk/WCV0gVzYrGI/AAAAAAAAANM/FspdQY6HqKAORRD1yt9pDE4wPjAjQc-sgCLcB/s1600/9.png" /></a></div>
</li>
<li>Your web browser will open a page like this:<a href="https://1.bp.blogspot.com/-5t6NGegWc68/WCV2UB1VV1I/AAAAAAAAANc/rrS7RSmjXscegey8uPu-Upe_DxsxCv-hwCEw/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="289" src="https://1.bp.blogspot.com/-5t6NGegWc68/WCV2UB1VV1I/AAAAAAAAANc/rrS7RSmjXscegey8uPu-Upe_DxsxCv-hwCEw/s640/10.png" width="640" /></a>
</li>
<li>Click on Access Apache Solr link which will pop up one authentication window. Enter credentials of admin account and click <b>Log In</b>.<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-ZZ7YvGykw4k/WCV01FeShrI/AAAAAAAAANU/6UfaEifpsq8oLfh-NygEYbnoBZgn2wNYwCLcB/s1600/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="384" src="https://3.bp.blogspot.com/-ZZ7YvGykw4k/WCV01FeShrI/AAAAAAAAANU/6UfaEifpsq8oLfh-NygEYbnoBZgn2wNYwCLcB/s640/11.png" width="640" /></a></div>
</li>
<li>Solr dashboard will be launched and should look like this:<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-irTdl05kOmw/WCV1Bpgx8bI/AAAAAAAAANY/svQxlfGRURYIZfDX2CTYzw_UBcmx7JuigCLcB/s1600/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="329" src="https://2.bp.blogspot.com/-irTdl05kOmw/WCV1Bpgx8bI/AAAAAAAAANY/svQxlfGRURYIZfDX2CTYzw_UBcmx7JuigCLcB/s640/12.png" width="640" /></a></div>
</li>
<li>You now have Solr instance up and running. Now we have to configure Solr to be used with Sitecore.</li>
</ol>
<div>
Comments and suggestions are most welcome. Happy coding!</div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/06805062278321133735noreply@blogger.com1Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-38950169833801374592016-11-02T20:51:00.001+05:302016-11-02T20:51:53.713+05:30Sitecore : Restore archived item programmatically<div dir="ltr" style="text-align: left;" trbidi="on">
This short blog post contains information about how to restore archived item programmatically in Sitecore 8. Use the below code snippet to achieve the functionality:
<br />
<pre>void RestoreArchivedItems()
{
using (new SecurityDisabler())
{
DateTime archiveDate = new DateTime(2016, 11, 1);
string originalLocationPathPrefix = "/sitecore/content/Home";
string archivedBy = "sitecore\\admin";
// get the archive database for the master database
Sitecore.Data.Archiving.Archive archive = Sitecore.Data.Database.GetDatabase("master").Archives["archive"];
// get archived items
var archivedItems =
archive.GetEntries(0, int.MaxValue)
.Where(entry =>
entry.ArchiveDate > archiveDate &&
entry.OriginalLocation.StartsWith(originalLocationPathPrefix) && entry.ArchivedBy.Equals(archivedBy, StringComparison.OrdinalIgnoreCase)
).ToList();
foreach (var archiveItem in archivedItems)
{
// restore the item
archive.RestoreItem(archiveItem.ArchivalId);
}
}
}</pre>
Comments and suggestions are most welcome. Happy coding!</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Gurugram, Haryana, India28.4594965 77.02663830000005928.236067 76.703914800000064 28.682926000000002 77.349361800000054tag:blogger.com,1999:blog-5846995979771784605.post-83692061864440491432016-09-23T23:06:00.001+05:302016-09-27T15:51:35.002+05:30Customizing PDF download behaviour for Sitecore multisite implementation<div dir="ltr" style="text-align: left;" trbidi="on">
Recently I got a requirement from my client where I have to customize PDF rendering behaviour for Sitecore multisite implementation. For few websites, PDF files should be rendered in web browser itself and for few websites, web browser should prompt the user to save the PDF files. I am working with Sitecore 8.2 initial release.<br />
<br />
PDF rendering behaviour is being managed by <b><forceDownload></b> element for PDF file media type under <b>\mediaLibrary\mediaTypes</b> configuration node. This setting can be found in <b>Sitecore.Config</b> file in <b>\Website\App_Config</b> folder. A <b>true </b>value for the <b>forceDownload</b> element causes Sitecore to apply an HTTP <b>"Content-Disposition = attachment; filename="</b> header when linking to the <b>.ashx</b> URL of the media item, causing the browser to prompt the user to open/save as rather than opening the media item in the browser.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-4yrOiz3bg_0/V-Viebi0O6I/AAAAAAAAAiU/WRXN8-1wfEg61Gva_55hBkNmoaU2NQfuwCLcB/s1600/blogpng.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-4yrOiz3bg_0/V-Viebi0O6I/AAAAAAAAAiU/WRXN8-1wfEg61Gva_55hBkNmoaU2NQfuwCLcB/s1600/blogpng.png" /></a></div>
<br />
Disabling/Enabling <b>forceDownload</b> behaviour for PDF file will impact all the websites but I need flexibility to disable/enable this behaviour across multiple websites. This behaviour can be achieved in two ways:
<br />
<ol style="text-align: left;">
<li>Forcing download on client side using HTML 5 <b>download </b>attribute</li>
<li>Override <b>MediaRequestHandler </b>and modify "<b>Content-Disposition</b>" in context response header<b><br /></b></li>
</ol>
<ol style="text-align: left;">
<li><u><b>Forcing download on client side using HTML 5 download attribute</b></u><br />Use HTML5 <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download" rel="nofollow" target="_blank">download attribute</a> on your anchor links. The download attribute specifies that the target will be downloaded when a user clicks on the hyperlink. <a href="http://caniuse.com/#feat=download" rel="nofollow" target="_blank">However this attribute is not supported by all the browsers</a>.
</li>
<li><u><b>Override MediaRequestHandler and modify "Content-Disposition" in context response header</b></u>
<br />Below are the steps to implement the desired behaviour across multiple websites:<ul>
<li>Create a new class library project in visual studio.</li>
<li>Add reference to Sitecore.Kernel.dll</li>
<li>Add a custom attribute in your site definition. For example, "<b>PdfForceDownloadDisabled</b>"
<pre><site name="mysite" patch:before="site[@name='website']"
virtualFolder="/"
physicalFolder="/"
rootPath="/sitecore/content"
startItem="/MySite"
database="web"
domain="extranet"
allowDebug="true"
cacheHtml="true"
htmlCacheSize="50MB"
enablePreview="true"
enableWebEdit="true"
enableDebugger="true"
<span style="background-color: yellow;"> PdfForceDownloadDisabled="true"</span>
hostName="local.mysite.com"
disableClientData="false"/></pre>
</li>
<li>Implement a custom Extension method :
<pre>using Sitecore.Diagnostics;
using Sitecore.Sites;
using System;
namespace CustomMedia
{
public static class UtilityManager
{
public static bool PdfForceDownloadDisabled(this SiteContext site)
{
Assert.IsNotNull(site, "Site cannot be null");
try
{
string PdfForceDownloadDisabled = site.Properties["PdfForceDownloadDisabled"];
if (!String.IsNullOrEmpty(PdfForceDownloadDisabled))
return Convert.ToBoolean(PdfForceDownloadDisabled);
}
catch (Exception)
{
return false;
}
return false;
}
}
}
</pre>
</li>
<li>Override <b>"protected override bool DoProcessRequest(HttpContext context, MediaRequest request, Sitecore.Resources.Media.Media media)"</b> method and modify <b>"Content-Disposition"</b> in context response header.
<pre>using Sitecore;
using Sitecore.Configuration;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Events;
using Sitecore.Resources.Media;
using Sitecore.Resources.Media.Streaming;
using Sitecore.Web;
using System.Web;
namespace CustomMedia
{
public class MediaRequestHandler : Sitecore.Resources.Media.MediaRequestHandler
{
protected override bool DoProcessRequest(HttpContext context, MediaRequest request, Sitecore.Resources.Media.Media media)
{
Assert.ArgumentNotNull(context, "context");
Assert.ArgumentNotNull(request, "request");
Assert.ArgumentNotNull(media, "media");
if (this.Modified(context, media, request.Options) == Tristate.False)
{
Event.RaiseEvent("media:request", new object[] { request });
this.SendMediaHeaders(media, context);
context.Response.StatusCode = 0x130;
return true;
}
this.ProcessImageDimensions(request, media);
MediaStream mediaStream = media.GetStream(request.Options);
if (mediaStream == null)
{
return false;
}
Event.RaiseEvent("media:request", new object[] { request });
if (Settings.Media.EnableRangeRetrievalRequest && Settings.Media.CachingEnabled)
{
using (mediaStream)
{
this.SendMediaHeaders(media, context);
new RangeRetrievalResponse(RangeRetrievalRequest.BuildRequest(context, media), mediaStream).ExecuteRequest(context);
<span style="background-color: yellow;"> //Update Header - Custom Add
this.UpdateHeader(media, context, mediaStream);</span>
return true;
}
}
this.SendMediaHeaders(media, context);
this.SendStreamHeaders(mediaStream, context);
using (mediaStream)
{
context.Response.AddHeader("Content-Length", ((long)mediaStream.Stream.Length).ToString());
WebUtil.TransmitStream(mediaStream.Stream, context.Response, Settings.Media.StreamBufferSize);
}
return true;
}
private void ProcessImageDimensions(MediaRequest request, Sitecore.Resources.Media.Media media)
{
int num;
int num2;
Assert.ArgumentNotNull(request, "request");
Assert.ArgumentNotNull(media, "media");
Item innerItem = media.MediaData.MediaItem.InnerItem;
int.TryParse(innerItem["Height"], out num2);
int.TryParse(innerItem["Width"], out num);
bool flag = false;
int maxHeight = Settings.Media.Resizing.MaxHeight;
if ((maxHeight != 0) && (request.Options.Height > System.Math.Max(maxHeight, num2)))
{
flag = true;
request.Options.Height = System.Math.Max(maxHeight, num2);
}
int maxWidth = Settings.Media.Resizing.MaxWidth;
if ((maxWidth != 0) && (request.Options.Width > System.Math.Max(maxWidth, num)))
{
flag = true;
request.Options.Width = System.Math.Max(maxWidth, num);
}
if (flag)
{
Log.Warn($"Requested image exceeds allowed size limits. Requested URL:{request.InnerRequest.RawUrl}", this);
}
}
<span style="background-color: yellow;"> private void UpdateHeader(Sitecore.Resources.Media.Media media, HttpContext context, MediaStream stream)
{
if (media.Extension.ToLower() == "pdf" && Sitecore.Context.Site.PdfForceDownloadDisabled())
{
context.Response.Headers["Content-Disposition"] = "inline; filename=\"" + stream.FileName + "\"";
}
}</span>
}
}
</pre>
</li>
<li>In <b>web.config</b>, replace <b><add verb="*" path="sitecore_media.ashx" type="Sitecore.Resources.Media.MediaRequestHandler, Sitecore.Kernel" name="Sitecore.MediaRequestHandler" /> </b> with the following line:
<pre><add verb="*" path="sitecore_media.ashx" type="CustomMedia.MediaRequestHandler, {your assembly name}" name="Sitecore.MediaRequestHandler" /></pre>
</li>
<li>Deploy your assembly in bin folder of your Sitecore website.</li>
</ul>
</li>
</ol>
Comments and suggestions are most welcome. Happy coding!
</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Noida, Uttar Pradesh, India28.5355161 77.39102649999995328.312280599999998 77.068302999999958 28.7587516 77.713749999999948tag:blogger.com,1999:blog-5846995979771784605.post-90133885749299896172016-09-20T17:07:00.000+05:302016-09-20T17:08:52.684+05:30Sitecore Commerce Server Manager : Profile Definition 404 Error <div dir="ltr" style="text-align: left;" trbidi="on">
I’ve been working with Sitecore commerce server manager for a while and recently I have stuck with one error related to Sitecore commerce server manager. I was unable to navigate through Profile Definitions in commerce server manager. I was getting <b>HTTP 404 The webpage cannot be found </b>error.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-ggOuRGeaMyQ/V-Ec_YhsuDI/AAAAAAAAAh0/l5zPYxMap7YvAdUBCurZQQ64_mOwp52ggCEw/s1600/20_Sept_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-ggOuRGeaMyQ/V-Ec_YhsuDI/AAAAAAAAAh0/l5zPYxMap7YvAdUBCurZQQ64_mOwp52ggCEw/s1600/20_Sept_1.png" /></a></div>
<br />
I’ve checked stack trace in fiddler and found out that <b>http://<server-name>/widgets/profilebldrHTC/ProfileEdit.htm</b> was throwing <b>404</b> error.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-xtnNbynJsSw/V-Ec_btJ0nI/AAAAAAAAAhw/Fms7G_JutkMTf2rrVq7iz74sJKwTTs-KQCEw/s1600/20_Sept_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-xtnNbynJsSw/V-Ec_btJ0nI/AAAAAAAAAhw/Fms7G_JutkMTf2rrVq7iz74sJKwTTs-KQCEw/s1600/20_Sept_2.png" /></a></div>
<br />
It seems that Sitecore Commerce Server creates virtual folder named <b>Widgets </b>in the IIS default website. This virtual folder points to <b>C:\Program Files (x86)\Commerce Server 11\Widgets</b> directory.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-DotygOLXNsM/V-Ec_enk7-I/AAAAAAAAAh4/Qmk07E8zzM0Jj5TAPoUlb5FtCuk3puP5wCEw/s1600/20_Sept_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-DotygOLXNsM/V-Ec_enk7-I/AAAAAAAAAh4/Qmk07E8zzM0Jj5TAPoUlb5FtCuk3puP5wCEw/s1600/20_Sept_3.png" /></a></div>
Follow below steps to resolve the 404 issue:<br />
<ol style="text-align: left;">
<li>Open IIS.</li>
<li>Navigate to default website in IIS.</li>
<li>Right click on default website and click Add Virtual Directory.</li>
<li>
Enter <b>Widgets </b>in Alias section. </li>
<li>Enter physical path as <b>C:\Program Files (x86)\Commerce Server 11\Widgets</b></li>
<li>Click OK.<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-6K39gLkNA44/V-Ec_-yOIEI/AAAAAAAAAh8/XcXYPL6J1cksxby2QmWf0NRyl3Uuwih-gCEw/s1600/20_Sept_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-6K39gLkNA44/V-Ec_-yOIEI/AAAAAAAAAh8/XcXYPL6J1cksxby2QmWf0NRyl3Uuwih-gCEw/s1600/20_Sept_4.png" /></a></div>
</li>
<li> Restart default website and refresh Sitecore commerce server manager. 404 error should have been gone now.<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-k36_uC_kN_g/V-EdAItxn_I/AAAAAAAAAiI/9bRp8AAtQ_8IctcVyqBxwRf4XceixyWsgCEw/s1600/20_Sept_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-k36_uC_kN_g/V-EdAItxn_I/AAAAAAAAAiI/9bRp8AAtQ_8IctcVyqBxwRf4XceixyWsgCEw/s1600/20_Sept_5.png" /></a></div>
</li>
</ol>
Comments and suggestions are most welcome. Happy coding!</div>
Dheer Rajpoothttp://www.blogger.com/profile/01492853372743958067noreply@blogger.com0Noida, Uttar Pradesh, India28.5355161 77.39102649999995328.312280599999998 77.068302999999958 28.7587516 77.713749999999948