tag:blogger.com,1999:blog-55260402730823141922024-03-14T01:19:54.501-07:00Sitecore XM Cloud, Ordercloud, CDP, Personalize, ContentHub and SendSitecore XM Cloud, Ordercloud, CDP, Personalize, ContentHub and Sendjitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.comBlogger239125tag:blogger.com,1999:blog-5526040273082314192.post-84818278575413748802023-12-03T14:18:00.000-08:002023-12-03T14:18:03.241-08:00Resolving "Valid value for rootItemId not provided" Error in Sitecore XP and Nex.jss Setup<p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh65ZRGpVP6aTdaypSBYfG-_D2VouroWDUtLWIsyrF1TQD78wNwnzlIoFRVkYRTVRgvpsUalZ7XWHm_AxZaWoEFVQFfD2FFwrjRBPiQ8e0s5glTddFiGc1kea0R9GaHIoKK-1QKbLNANhSZCBsIx3bQ75223_Zj6ZNLtnLTpDdafb6iqfcDw_IZWZbaQ/s1032/Sitecore%20Error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="562" data-original-width="1032" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh65ZRGpVP6aTdaypSBYfG-_D2VouroWDUtLWIsyrF1TQD78wNwnzlIoFRVkYRTVRgvpsUalZ7XWHm_AxZaWoEFVQFfD2FFwrjRBPiQ8e0s5glTddFiGc1kea0R9GaHIoKK-1QKbLNANhSZCBsIx3bQ75223_Zj6ZNLtnLTpDdafb6iqfcDw_IZWZbaQ/w640-h348/Sitecore%20Error.png" width="640" /></a></div><p>Recenlty, I encountered an error that might be familiar to Sitecore XP and Nex.jss users: "Error: Valid value for rootItemId not provided and failed to auto-resolve app root item." In this blog post, I'll share the solution to this issue, providing step-by-step guidance to address it.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxE8fE8MeqDMRo-K3hwiQ7QGVbV9E95ce9uj3ltzRPMudxfk38oWEgKF9unuSSXV4YcAV0Oi_1HrSqKrGLPZg33Z17x8K8kG9lD6rvNRdT3KJIpAdKxwFgPcrHbrb0Bu17FPaL2cD32Ds1_V0549flAQDBTAuZZmub_0wKaALi59xsVyYvjcVYX3AOi-A/s2516/Error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="886" data-original-width="2516" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxE8fE8MeqDMRo-K3hwiQ7QGVbV9E95ce9uj3ltzRPMudxfk38oWEgKF9unuSSXV4YcAV0Oi_1HrSqKrGLPZg33Z17x8K8kG9lD6rvNRdT3KJIpAdKxwFgPcrHbrb0Bu17FPaL2cD32Ds1_V0549flAQDBTAuZZmub_0wKaALi59xsVyYvjcVYX3AOi-A/w640-h226/Error.png" width="640" /></a></div><br /><p><br /></p><p>The Error: Upon initiating the client setup, the mentioned error surfaced, indicating a missing or incorrectly configured rootItemId. The solution to this problem lies within the Sitecore environment, specifically in the site group settings.</p><p>Solution Steps: To resolve the "Valid value for rootItemId not provided" error, follow these steps:</p><p><b>Access Sitecore CMS:</b></p><p>Log in to your Sitecore Content Management System.</p><p>Navigate to Site Group Settings.</p><p>Go to the following location in the Content Editor: /sitecore/content/MainSite/Site1/Settings/Site Grouping/Site1.</p><p>Locate the app name field:</p><p>Once you're on the designated path, look for the field related to the application name. This is crucial for resolving the error.</p><p><b>Update the app name:</b></p><p>Provide the correct name for the app in the designated field. Ensure accuracy and consistency with your application settings.</p><p><b>Save Changes:</b></p><p>After updating the app name, save the changes in Sitecore. This step is essential for the changes to take effect.</p><p><b>Rebuild and deploy:</b></p><p>Depending on your setup, consider rebuilding and redeploying your Sitecore and Nex.js applications to ensure that the changes are reflected.</p><p><b>Verify the fix:</b></p><p>Finally, revisit your application and confirm that the error no longer persists. If configured correctly, the rootItemId issue should be resolved.</p><p><b>Conclusion</b>: By following the outlined steps, you can successfully address the "Valid value for rootItemId not provided" error in Sitecore XP and Nex.jss setups. Keep in mind the importance of accurate app naming in the Site Group Settings, as this directly impacts the resolution of the issue.</p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-86467872083888206892023-11-18T03:14:00.000-08:002023-12-03T16:26:07.246-08:00TypeError: Cannot read properties of undefined (reading 'parents')<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4Q9cMjjH8XCTxzm5hA3JtAKQoQQWx4V3idqpI8smBA8mKk15U2pJ2Cc8MnmIauig4jtx3Tqo6A2B2JQiaveaY9Cqkp0BTffr0SAfNtz0oJEDvzjWNVUBvGhSJwFegqTlUlofQ9feyOyqZdIOrRnbGwPxTGyAyoUh9BDAac4IlEvQLWZacmdydHtIcZS4/s1921/Errror.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1076" data-original-width="1921" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4Q9cMjjH8XCTxzm5hA3JtAKQoQQWx4V3idqpI8smBA8mKk15U2pJ2Cc8MnmIauig4jtx3Tqo6A2B2JQiaveaY9Cqkp0BTffr0SAfNtz0oJEDvzjWNVUBvGhSJwFegqTlUlofQ9feyOyqZdIOrRnbGwPxTGyAyoUh9BDAac4IlEvQLWZacmdydHtIcZS4/w640-h358/Errror.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div><span style="color: #252525;">During the deployment of a Next.js application, you may encounter the error 'TypeError: Cannot read properties of undefined (reading 'parents')'. This error indicates that the code is attempting to access a property named 'parents' on an object that is undefined.</span></div><div>
<p data-sourcepos="7:1-7:22" style="color: #252525;"><strong>Cause of the Error</strong></p>
<p data-sourcepos="9:1-9:40" style="color: #252525;">The error typically arises when the code expects an object to have a 'parents' property, but the object is either undefined or does not have that property. This can happen due to various reasons, such as:</p>
<ul data-sourcepos="11:1-16:0" style="color: #252525;">
<li data-sourcepos="11:1-12:0">
<p data-sourcepos="11:3-11:168"><strong>Incorrect or missing layout path:</strong> The layout path might be incorrect, leading to the inability to load the required components and resulting in undefined objects.</p>
</li>
<li data-sourcepos="13:1-14:0">
<p data-sourcepos="13:3-13:169"><strong>Data fetching issues:</strong> If the code relies on data fetched from an API or other sources, any issues in fetching or processing the data can lead to undefined objects.</p>
</li>
<li data-sourcepos="15:1-16:0">
<p data-sourcepos="15:3-15:126"><strong>Component rendering errors:</strong> Errors in component rendering can cause unexpected behaviour and result in undefined objects.</p>
</li>
</ul>
<p data-sourcepos="17:1-17:21" style="color: #252525;"><strong>Resolving the issue</strong></p>
<p data-sourcepos="19:1-19:50" style="color: #252525;">To resolve this error, you can follow these steps:</p>
<ol data-sourcepos="21:1-26:0" style="color: #252525;">
<li data-sourcepos="21:1-22:0">
<p data-sourcepos="21:4-21:140"><strong>Verify Layout Path:</strong> Double-check the layout path to ensure it is correct and points to the intended location of the layout component.</p>
</li>
<li data-sourcepos="23:1-24:0">
<p data-sourcepos="23:4-23:179"><strong>Inspect Data Fetching:</strong> Check if the data fetching process is working correctly and that the fetched data is being properly parsed and assigned to the appropriate variables.</p>
</li>
<li data-sourcepos="25:1-26:0">
<p data-sourcepos="25:4-25:202"><strong>Review Component Rendering:</strong> Review the component rendering logic to ensure that the components are being rendered correctly and that there are no errors that might be causing unexpected behaviour.</p>
</li>
</ol>
<p data-sourcepos="27:1-27:26" style="color: #252525;"><strong>Alternative Approaches</strong></p>
<p data-sourcepos="29:1-29:98" style="color: #252525;">In addition to the above steps, you can also consider alternative approaches to address the error:</p>
<ul data-sourcepos="31:1-36:0" style="color: #252525;">
<li data-sourcepos="31:1-32:0">
<p data-sourcepos="31:3-31:140"><strong>Conditional Rendering:</strong> Implement conditional rendering to check if the object is undefined before attempting to access its properties.</p>
</li>
<li data-sourcepos="33:1-34:0">
<p data-sourcepos="33:3-33:121"><strong>Default Values:</strong> Provide default values for the object's properties to prevent undefined values from causing errors.</p>
</li>
<li data-sourcepos="35:1-36:0">
<p data-sourcepos="35:3-35:135"><strong>Error Handling:</strong> Implement robust error handling to gracefully handle undefined objects and prevent the application from crashing.</p>
</li>
</ul>
<p data-sourcepos="37:1-37:14" style="color: #252525;"><strong>Conclusion</strong></p>
<p data-sourcepos="39:1-39:259" style="color: #252525;">The 'TypeError: Cannot read properties of undefined (reading 'parents')' error can be resolved by carefully examining the layout path, data fetching, and component rendering logic. </p><p data-sourcepos="39:1-39:259" style="color: #252525;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvm3EyeDRu6XcRtdYiTO8ohadeHaCfX3tzBYCFC5dLPgkXL7q6FExCqknu8sW426ttSkIhH4kVofthE-StLb6b5UlwNB2Sbq6xenns_vYM0DYbt3XKcigTjhYX-7jSXNdwzmxYaf3-mCqWNzespv_GCqMyBEzBFXu8eddJQ27zlJPFFkVpUDkgJStEl28/s1233/Correct%20Path.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="301" data-original-width="1233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvm3EyeDRu6XcRtdYiTO8ohadeHaCfX3tzBYCFC5dLPgkXL7q6FExCqknu8sW426ttSkIhH4kVofthE-StLb6b5UlwNB2Sbq6xenns_vYM0DYbt3XKcigTjhYX-7jSXNdwzmxYaf3-mCqWNzespv_GCqMyBEzBFXu8eddJQ27zlJPFFkVpUDkgJStEl28/s16000/Correct%20Path.png" /></a></p><p data-sourcepos="39:1-39:259" style="color: #252525;">In my case I did two things, One is updated the Layout path and publish the items and second is Implemented conditional rendering considerig the experience editor mode.</p></div>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-13035609688373981992023-11-15T15:14:00.000-08:002023-11-29T04:31:32.773-08:00Mastering Environment Management in Sitecore XM Cloud: A Comprehensive Guide<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-11lFOWQEEIhB9h76KWzYF8kQ4dnJ95b-KwqUFIhsTkr6AmByYJuvxqWigVKuXIdh_YWrOg8Y-k_rr-PfSirxscl7cNBT1acQLBfErgMb8usqOiR1ijb3hGm674zKJyW0zWU_fP1q9TsFG-268ky6kPqcuLqcY_Ztu-PnpqyASDCkLABI2_xPvkFPhew/s632/Sitecore%20Xm%20Cloud%20setup.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="520" data-original-width="632" height="526" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-11lFOWQEEIhB9h76KWzYF8kQ4dnJ95b-KwqUFIhsTkr6AmByYJuvxqWigVKuXIdh_YWrOg8Y-k_rr-PfSirxscl7cNBT1acQLBfErgMb8usqOiR1ijb3hGm674zKJyW0zWU_fP1q9TsFG-268ky6kPqcuLqcY_Ztu-PnpqyASDCkLABI2_xPvkFPhew/w640-h526/Sitecore%20Xm%20Cloud%20setup.png" width="640" /></a></p><p>Sitecore XM Cloud empowers organizations to craft personalized and engaging digital experiences. Efficiently managing environments and projects is crucial for successful implementation and maintenance. This technical guide delves into the steps involved in deleting an existing environment and creating a new one within Sitecore XM Cloud.</p><p><b>Deleting an Project: A Step-by-Step Guide</b></p><p><b>Step 1: Navigating to the Control Panel</b></p><p>Log in to the Sitecore XM Cloud Control Panel.</p><p>Seamlessly navigate to the project and "Environments" section.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu0JhOIo1cY2VhTj88IDxGR6hEs0aqMHlCpSaJpzRy_5_OD1TGjuSsHiMmB76LCVCCKovjgdhzo919pk-vUzWf1TAh0uC7VwMDx1-JzSzQYOtyzDjtNnheIK2tfp9KvVTNor2NTuAqNKlSdwh0BiDrcKp1TwDW5CzdvARpT8PLfN0i8MgXTHLHo-WjpG8/s1882/Delte%20Env.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="860" data-original-width="1882" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu0JhOIo1cY2VhTj88IDxGR6hEs0aqMHlCpSaJpzRy_5_OD1TGjuSsHiMmB76LCVCCKovjgdhzo919pk-vUzWf1TAh0uC7VwMDx1-JzSzQYOtyzDjtNnheIK2tfp9KvVTNor2NTuAqNKlSdwh0BiDrcKp1TwDW5CzdvARpT8PLfN0i8MgXTHLHo-WjpG8/w640-h292/Delte%20Env.png" width="640" /></a></div><br /><p>it's required that first you delete all the environment and after that you will see option to delete the project.</p><p><b>Step 2: Selecting the Environment for Deletion</b></p><p>Within the "Environments" section, identify the environment you intend to delete.</p><p>Click on the environment's name to access its details.</p><p><b>Step 3: Initiating Environment Deletion</b></p><p>Locate the "Delete" option within the environment details.</p><p>A confirmation dialog will appear. Confirm the deletion by following the on-screen instructions.<span> </span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_xWmwjTouu0TnZy6rpu8_Sne_pAwXZmkKx3mp1R0g3x05jlPpsWM6NQBfJPMUPlm8HcvxD0Q0qg22fOWWrkCeimK-pIqDmFcSyNjV_sZCB0JmqJT_-jWne-b0BUOLKaISPWm_sS6J21dHD9-33buip8-zuQOvm8JaE1KzFSOp6lEmv3PTuvtCh_ml2mk/s1888/Optoin%203.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="730" data-original-width="1888" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_xWmwjTouu0TnZy6rpu8_Sne_pAwXZmkKx3mp1R0g3x05jlPpsWM6NQBfJPMUPlm8HcvxD0Q0qg22fOWWrkCeimK-pIqDmFcSyNjV_sZCB0JmqJT_-jWne-b0BUOLKaISPWm_sS6J21dHD9-33buip8-zuQOvm8JaE1KzFSOp6lEmv3PTuvtCh_ml2mk/w640-h248/Optoin%203.png" width="640" /></a></div><p><br /></p><p>Option to delete</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWsNAdJ75OJiNui7wLmsV_I2idDQQ1a9HTtSvMpPseBjbr1J1t4YkNhs543iLhu_2Ak77XWwzTxQVdpAi4AsP6VrT7Ais5NXwwD8qadyBLjTmauo1POxrp5f3FmpqCnQBIx5QsXUtTjBQpJDWJxL9WsdvE1aL-oijHfQP2GYuZAVteX9MJC4SK0R_gZ7Q/s1452/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="354" data-original-width="1452" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWsNAdJ75OJiNui7wLmsV_I2idDQQ1a9HTtSvMpPseBjbr1J1t4YkNhs543iLhu_2Ak77XWwzTxQVdpAi4AsP6VrT7Ais5NXwwD8qadyBLjTmauo1POxrp5f3FmpqCnQBIx5QsXUtTjBQpJDWJxL9WsdvE1aL-oijHfQP2GYuZAVteX9MJC4SK0R_gZ7Q/w640-h156/4.png" width="640" /></a></div><br /><p><br /></p><p><b>Creating a New Environment: A Step-by-Step Guide</b></p><p>After deleting an environment or when establishing a new project, creating a new environment is the next step.</p><p>I'm going to use the Sitecore CL to setup the project and enviroment, here are some command details</p><p>XM Cloud projects are like collections of Sitecore XM environments, allowing you to organize and manage your Sitecore solutions effectively. Embarking on an XM Cloud project is an exciting venture, and I'm here to guide you through the initial steps.</p><p>Fist, you need to relogin using the CLI, otherwise you will get below errror </p><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3EfQozp2Nk2cNn1VzXw6v3TL8mpluXIrskp4kCJBcDzkOVvl1G5A_-S-slNZryuwmZr72VZ63KWdJ714v1M9Wxd20KHxtndb-dJsGDETXN9svXIMNIdUEQ7k-7KV8Jx3aiF0JKlMmau_np9SEYD6FAoCi3XzfNrw1dba7JY_jzz5h9lHY3zIJ0gE4MQ4/s1222/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="224" data-original-width="1222" height="118" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3EfQozp2Nk2cNn1VzXw6v3TL8mpluXIrskp4kCJBcDzkOVvl1G5A_-S-slNZryuwmZr72VZ63KWdJ714v1M9Wxd20KHxtndb-dJsGDETXN9svXIMNIdUEQ7k-7KV8Jx3aiF0JKlMmau_np9SEYD6FAoCi3XzfNrw1dba7JY_jzz5h9lHY3zIJ0gE4MQ4/w640-h118/5.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJGGwokGvfgumlkns4T0G6l2Ca5WoSJgIzoBbcG9-yojPiYMTdAh3EwGjkj1QiIKIzaPkS4rvQrYlnZ5baTox_0HepxNBo7kDwQxtxQEsJxt6Cu9MLBzfOC3aOpHLjnRiUUT2sx5r7N4NB38jlBdLDscwyqM7g6fTjrxlabW1XTlXUYrHQH7c71KSzZE4/s1297/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="309" data-original-width="1297" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJGGwokGvfgumlkns4T0G6l2Ca5WoSJgIzoBbcG9-yojPiYMTdAh3EwGjkj1QiIKIzaPkS4rvQrYlnZ5baTox_0HepxNBo7kDwQxtxQEsJxt6Cu9MLBzfOC3aOpHLjnRiUUT2sx5r7N4NB38jlBdLDscwyqM7g6fTjrxlabW1XTlXUYrHQH7c71KSzZE4/w640-h152/6.png" width="640" /></a></div><p><br /></p><p><b>Step 1: Creating Your XM Cloud Project</b></p><p>Navigate to your project's working directory using the command line.</p><p>Execute the following command to create a new XM Cloud project:</p><p><b><u><i>dotnet sitecore cloud project create --name <project-name></i></u></b></p><p><b><u><i>Replace <project-name> with a descriptive name for your project.</i></u></b></p><p>For instance, to create a project named "MyXMCloudProject," use the following command:</p><p>dotnet sitecore cloud project create --name MyXMCloudProject</p><p>Note the assigned project ID for future reference.</p><p><b>Tip:</b> To retrieve the project ID at any time, use the following command:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheaNjkIe0eQoTufkhWthevE6sbU48yB2X44f9RIPn8WVGnCmHxOb5Y_pfK4PH3TIpEV3jhTQri_5_RNv4Z-WYzP34Z_OXCcOYvrCCdRHmAdwvtc4EW6_GwNpLd0Hwc16Qhu6erWLa4JxYY511t69kmEquIrUqBNu10BJTATXuxxm4YflS15mCKuNh1qd4/s1338/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="328" data-original-width="1338" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheaNjkIe0eQoTufkhWthevE6sbU48yB2X44f9RIPn8WVGnCmHxOb5Y_pfK4PH3TIpEV3jhTQri_5_RNv4Z-WYzP34Z_OXCcOYvrCCdRHmAdwvtc4EW6_GwNpLd0Hwc16Qhu6erWLa4JxYY511t69kmEquIrUqBNu10BJTATXuxxm4YflS15mCKuNh1qd4/w640-h156/7.png" width="640" /></a></div><p><br /></p><p><b><u><i>dotnet sitecore cloud project list</i></u></b></p><p><b>Step 2: Creating an Environment for Your XM Cloud Project</b></p><p>Within your project's working directory, open a command-line window.</p><p>Execute the following command to create an environment for your project:</p><p><b><u><i>dotnet sitecore cloud environment create --name <name> --project-id <project-id></i></u></b></p><p><b><u><i>Replace <name> with a meaningful name for your environment.</i></u></b></p><p><b><u><i>Replace <project-id> with the project ID you noted earlier.</i></u></b></p><p>For example, to create an environment named "staging" for your project with ID "6btMioN1QDVjSUvQkklkVR," use the following command:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1KYgFCTrZpweh6ed-XQ9T6O0Ws_mjG2SkltBXPt6ZSr7ngjq9TrCcTrTxqx-j97T_CCWCw5SCtCmXyPzNiDE_WQ7_98b_asYL7SGx6a-bf9ryWlDqK066Ofsq8Ir2c_buWgFJI2VslZ2QwVBZ25k0fLYSQtW2fmiPhN-nMYGpzvwk5ZBWhZ4cAcX-tSk/s1231/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="471" data-original-width="1231" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1KYgFCTrZpweh6ed-XQ9T6O0Ws_mjG2SkltBXPt6ZSr7ngjq9TrCcTrTxqx-j97T_CCWCw5SCtCmXyPzNiDE_WQ7_98b_asYL7SGx6a-bf9ryWlDqK066Ofsq8Ir2c_buWgFJI2VslZ2QwVBZ25k0fLYSQtW2fmiPhN-nMYGpzvwk5ZBWhZ4cAcX-tSk/w640-h244/8.png" width="640" /></a></div><br /><p><br /></p><p><b><u><i>dotnet sitecore cloud environment create --name staging --project-id 6btMioN1QDVjSUvQkklkVR</i></u></b></p><p><b>Note </b>the assigned environment ID for future reference.</p><p><b>Tip</b>: To retrieve the environment ID at any time, use the following command:</p><p><b><u><i>dotnet sitecore cloud environment list --project-id <project-id></i></u></b></p><p><b>Step 3: Deploying Your Solution to the XM Cloud Environment</b></p><p>Within your project's working directory, open a command-line window.</p><p>Execute the following command to initiate the deployment process:</p><p>dotnet sitecore cloud deployment create --environment-id <environment-id> --upload</p><p>Replace <environment-id> with the environment ID you noted earlier.</p><p><b><u>Example </u></b></p><p><b><u>dotnet sitecore cloud deployment create --environment-id abc</u></b></p><p>This command creates a deployment that kicks off immediately and includes all the code in your current working directory.</p><p><b>Tip</b>: To retrieve the environment ID, use the following command:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgonJMAf-AvLFK9py1UbozO0vGCx7eU-u4BwIfUqfi80FwSQs5r72PkNiBmAx6WuH9-EuLwI3Rg8T0BcdivRB98zBHCoilGmbyJQiIrmBshUk-Afmjq2EodT0jEFvrEzJ42vFoAjpV_IlanRXaCTxsTc7vKgWyHSEtIB3hyPE6cQt_2Ufl-o92ZnoX2a1M/s1113/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="304" data-original-width="1113" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgonJMAf-AvLFK9py1UbozO0vGCx7eU-u4BwIfUqfi80FwSQs5r72PkNiBmAx6WuH9-EuLwI3Rg8T0BcdivRB98zBHCoilGmbyJQiIrmBshUk-Afmjq2EodT0jEFvrEzJ42vFoAjpV_IlanRXaCTxsTc7vKgWyHSEtIB3hyPE6cQt_2Ufl-o92ZnoX2a1M/w640-h174/10.png" width="640" /></a></div><br /><p><br /></p><p><b><u><i>dotnet sitecore cloud environment list --project-id <project-id></i></u></b></p><p>Once the deployment completes, the command line will display a URL pointing to your XM Cloud Sitecore CM instance. Open the link to access your Sitecore XM Cloud CM instance.</p><p>To access the Sitecore Launchpad, append /sitecore to the root URL of the instance in your browser's address bar.</p><p>Congratulations! You've successfully created an XM Cloud project, established an environment, and deployed your solution. Now, you're ready to embark on your Sitecore development journey.</p><p></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-26483072482770394942023-11-10T03:27:00.000-08:002023-12-03T16:34:43.948-08:00Mastering Sitecore OrderCloud: A Comprehensive Guide to Sandbox Setup and Best Practices<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ1EIDkogQrvGFjCOQhpwNPqflpZMhjRVEhfklIM1zKlQuXwveDPSR04fnaOQNsIwwj47iJefYcCCffx3MLVznMY6iheO-nrmk6Vejbpfp-dP8pGCFV7XzL-xxEeeMzdR85opEEblTbT2nJpAQldfe3Pv7FpQROn6N-CzHeXh1xoDUQJJ52fx75bC-AjQ/s3648/Order%20Clou.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1555" data-original-width="3648" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ1EIDkogQrvGFjCOQhpwNPqflpZMhjRVEhfklIM1zKlQuXwveDPSR04fnaOQNsIwwj47iJefYcCCffx3MLVznMY6iheO-nrmk6Vejbpfp-dP8pGCFV7XzL-xxEeeMzdR85opEEblTbT2nJpAQldfe3Pv7FpQROn6N-CzHeXh1xoDUQJJ52fx75bC-AjQ/w640-h272/Order%20Clou.png" width="640" /></a></div>Sitecore OrderCloud offers a powerful platform for e-commerce solutions, and getting started with a well-optimized sandbox environment is crucial for efficient development and testing. In this technical blog, we'll walk through the process of setting up a Sitecore OrderCloud sandbox and delve into best practices to ensure a seamless development experience.<div><p data-sourcepos="31:1-31:50" style="color: #252525;"><strong>1. Use the Sitecore OrderCloud Developer Tools.</strong></p>
<p data-sourcepos="33:1-33:127" style="color: #252525;">Sitecore OrderCloud provides a number of developer tools to help you develop and deploy your applications. These tools include:</p><ul data-sourcepos="35:1-38:0" style="color: #252525;">
<li data-sourcepos="36:1-36:48">The Postman collection for Sitecore OrderCloud</li>
<li data-sourcepos="37:1-38:0">The Sitecore OrderCloud documentation</li>
</ul>
<p data-sourcepos="39:1-39:55" style="color: #252525;"><strong>2. Follow the Sitecore OrderCloud Coding Guidelines.</strong></p>
<p data-sourcepos="41:1-41:227" style="color: #252525;">The Sitecore OrderCloud coding guidelines provide a set of best practices for developing Sitecore OrderCloud applications. These guidelines help to ensure that your applications are well-architected, maintainable, and scalable.</p>
<p data-sourcepos="43:1-43:26" style="color: #252525;"><strong>3. Use version control.</strong></p>
<p data-sourcepos="45:1-45:183" style="color: #252525;">It is important to use version control when developing Sitecore OrderCloud applications. This will help you track changes to your code and revert to previous versions if necessary.</p>
<p data-sourcepos="47:1-47:40" style="color: #252525;"><strong>4. Test your applications thoroughly.</strong></p>
<p data-sourcepos="49:1-49:223" style="color: #252525;">It is important to test your Sitecore OrderCloud applications thoroughly before deploying them to production. This will help to ensure that your applications are working correctly and that they are not causing any problems.</p><p data-sourcepos="49:1-49:223" style="color: #252525;">Apart from that, in terms or architecture below are some key highlights</p><p data-sourcepos="49:1-49:223"><span style="color: #252525;"><b>How the Components Interact</b></span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;">When a user makes a request to the Sitecore OrderCloud API, the request is first routed to the API gateway. The API gateway then determines which backend service is responsible for handling the request and routes the request to that service. The backend service then processes the request and returns a response to the API gateway. The API gateway then returns the response to the user.</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;"><b>Benefits of the Architecture</b></span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;">The Sitecore OrderCloud architecture has a number of benefits, including:</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;"><b>Headless</b>: The headless architecture allows developers to build custom front-ends that are tailored to the specific needs of their business.</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;"><b>Scalable</b>: The architecture is highly scalable and can be easily deployed to cloud platforms like Amazon Web Services (AWS) and Microsoft Azure.</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;"><b>Secure</b>: The platform is very secure and includes a number of features to protect data from unauthorized access.</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;">Example of How the Architecture Can Be Used</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;"><br /></span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;">Here is an example of how the Sitecore OrderCloud architecture can be used to build a custom e-commerce storefront:</span></p><p data-sourcepos="49:1-49:223"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjz3xPNUvDm8VfV2Fw3EZNFfXlshgEJyNbyqZOr6AtZFhpczgFZfSKW8KTDoxHjgo-TIERQ5dAsSZFvydq5-DneEjurRSbTf8G0LnDAhsx1M4kykY-fQj7ce4dQuH4MjvgYPjZaBEKZ5AFcOogWUBWQWFUkDnrBnRbH5EVYkY5M7r8G9Go8GhicGcA22U/s1485/order%20cloud.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="999" data-original-width="1485" height="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjz3xPNUvDm8VfV2Fw3EZNFfXlshgEJyNbyqZOr6AtZFhpczgFZfSKW8KTDoxHjgo-TIERQ5dAsSZFvydq5-DneEjurRSbTf8G0LnDAhsx1M4kykY-fQj7ce4dQuH4MjvgYPjZaBEKZ5AFcOogWUBWQWFUkDnrBnRbH5EVYkY5M7r8G9Go8GhicGcA22U/w640-h430/order%20cloud.png" width="640" /></a></div><br /><span style="color: #252525;">Image Source - </span><span style="background-color: white; font-family: var(--fonts-heading); font-size: var(--fontSizes-6xl); font-weight: var(--fontWeights-semibold);"><a href="https://developers.sitecore.com/learn/integrations/oc-cdp">Integrating Sitecore OrderCloud with Sitecore CDP</a></span><p></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;">A developer would create a custom front-end that uses the Sitecore OrderCloud API to fetch product data, order data, and customer data.</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;">The front-end would then use this data to display a product catalog, shopping cart, and checkout page.</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;">When a customer places an order, the front-end would send the order data to the Sitecore OrderCloud API.</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;">The API would then process the order and create a new order record in the database.</span></p><p data-sourcepos="49:1-49:223"><span style="color: #252525;">The customer would then be sent an email confirmation of their order.</span></p>
<h3 class="" data-sourcepos="51:1-51:14" style="color: #252525;">Conclusion </h3><p data-sourcepos="53:1-53:276"><span style="color: #252525;">The Sitecore OrderCloud architecture is a powerful and flexible solution for building digital commerce applications. It is a headless architecture that allows developers to build custom front-ends that are tailored to the specific needs of their business. The architecture is highly scalable and can be easily deployed to cloud platforms. The platform is also very secure and includes a number of features to protect data from unauthorized access.</span></p><p data-sourcepos="53:1-53:276"><span style="color: #252525;">By following the best practices outlined in this blog post, you can develop and deploy Sitecore OrderCloud applications that are well-architected, maintainable, and scalable.</span></p></div>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-42618941710958836182023-10-21T04:22:00.000-07:002023-12-03T17:11:33.145-08:00Maximizing Sitecore XM Cloud: Unraveling Multisite Setup Options<p><br /></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU3TPDMQPrKIXLce0nwN-F38Rk_DArCjuuuyllLnjEwrN2zpFD20mWsFZP5u9WKrA6sjlXjQcAwqPrcQLGzPMqmli86sbAouKuSgg61ghI8WyWJfZ84eHI1tl0dkSGnD1nyaX3umk1DAYR7auRJkboL5paZWOX9olfoly1IgHoSnhGBiujjevPJJedRxg/s1061/Sitecore%20CM%20Cloud.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="337" data-original-width="1061" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU3TPDMQPrKIXLce0nwN-F38Rk_DArCjuuuyllLnjEwrN2zpFD20mWsFZP5u9WKrA6sjlXjQcAwqPrcQLGzPMqmli86sbAouKuSgg61ghI8WyWJfZ84eHI1tl0dkSGnD1nyaX3umk1DAYR7auRJkboL5paZWOX9olfoly1IgHoSnhGBiujjevPJJedRxg/w640-h204/Sitecore%20CM%20Cloud.png" width="640" /></a></div><br />Sitecore XM Cloud stands out for its unparalleled flexibility in managing multiple sites within its ecosystem. A critical decision in setting up multisite configurations is whether to employ a single head to serve multiple sites or deploy multiple heads to manage distinct sites. In this article, we'll delve into both options, highlighting their advantages, considerations, and best use cases.<p></p><p><b>Option 1: Single Head to Serve Multiple Sites</b></p><p>In this approach, a single Sitecore head takes on the responsibility of serving content to multiple sites. Each site shares the same backend infrastructure, reducing operational overhead and potentially minimizing costs.</p><p><b><u><i>Advantages:</i></u></b></p><p></p><ul style="text-align: left;"><li>Centralised Management: Maintenance and updates are streamlined as all sites operate within a unified instance.</li><li>Cost-Efficiency: Shared infrastructure can lead to cost savings in terms of resource utilization and hosting expenses.</li><li>Unified User Experience: Consistency in content management and administration interfaces facilitates a standardized user experience.</li></ul><p></p><p><b><u><i>Considerations:</i></u></b></p><p></p><ul style="text-align: left;"><li>Scalability Challenges: As traffic and content demands increase, a single head might face scalability challenges, impacting site performance.</li><li>Customisation Limitations: Achieving distinct branding and feature sets for each site might be more challenging due to shared resources.</li></ul><div><b><u><i>Implementation:- </i></u></b></div><div><b><u><i><br /></i></u></b></div><div>Sitcore has the build in plugin which can be used, here is the high level digram, taken from the Sitecore site just for the reference here.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHCI6Q7jJkcVvv296iuEnX0I_bQeAtXy405v-t0s39kSRDYdkhFzBG73mkXQXuCPC0_LTdZEcLlGHXVXhimukL-klwzlZGU6X6hKlXfBg7ttygBzqJpEnuGacACcWNSHealMEv8lIE3vlc5iyVR18EK0zzduIWdTzFxrFGpzUR3s6fAP2hyuwBTU3WWDI/s1035/Single%20Head.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1000" data-original-width="1035" height="618" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHCI6Q7jJkcVvv296iuEnX0I_bQeAtXy405v-t0s39kSRDYdkhFzBG73mkXQXuCPC0_LTdZEcLlGHXVXhimukL-klwzlZGU6X6hKlXfBg7ttygBzqJpEnuGacACcWNSHealMEv8lIE3vlc5iyVR18EK0zzduIWdTzFxrFGpzUR3s6fAP2hyuwBTU3WWDI/w640-h618/Single%20Head.png" width="640" /></a></div><br /><div>Image source taken from the Sitecore - <a href="https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-headless-development/the-next-js-multisite-add-on.html">The Next.js Multisite add-on</a></div><div>Full Implementation details can be found in above link, after doing the setup, when you run the application (Next.jss) app, it it will give a site reponse as a collection of all the sites.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfFoGxQH58iqsmof6o9lqDaR5BfFb-vxFdumIfo28VLBjh771XeqWrb-nkSuCy-Py8-J_pK269pXpdTt5u8z1cOBRVFZDsrFIfzuF_ridigLYxkuXEAJElyM_t2BQYd5IK6gwWBcpAdENsXzWy_GAuiuHqi3o4bEtaXA-Sxiaf9xi0CEqVNEXhyphenhyphenEZQoB4/s1586/Sitecore%20data.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="320" data-original-width="1586" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfFoGxQH58iqsmof6o9lqDaR5BfFb-vxFdumIfo28VLBjh771XeqWrb-nkSuCy-Py8-J_pK269pXpdTt5u8z1cOBRVFZDsrFIfzuF_ridigLYxkuXEAJElyM_t2BQYd5IK6gwWBcpAdENsXzWy_GAuiuHqi3o4bEtaXA-Sxiaf9xi0CEqVNEXhyphenhyphenEZQoB4/w640-h130/Sitecore%20data.png" width="640" /></a></div><br /><div><br /></div><p></p><p><b>Option 2: Multiple Heads to Serve Multiple Sites</b></p><p>In this scenario, each site is associated with its dedicated Sitecore head, providing autonomy in terms of content management and scalability.</p><p><b><u><i>Advantages:</i></u></b></p><p></p><ol style="text-align: left;"><li>Scalability: Each site can scale independently based on its specific requirements, ensuring optimal performance.</li><li>Customization Flexibility: Tailoring each site to its unique branding and functionality is more achievable with separate heads.</li><li>Isolation: The independence of heads ensures that issues or updates on one site do not impact others.</li></ol><p></p><p><b><u><i>Considerations:</i></u></b></p><p></p><ul style="text-align: left;"><li>Increased Management Complexity: Operating multiple heads necessitates additional management efforts for updates and maintenance.</li><li>Resource Utilisation: Separate heads might lead to increased resource utilization, potentially impacting hosting costs.</li></ul><div><b><u><i>Implementation:- </i></u></b></div><div><b><u><i><br /></i></u></b></div><div>I used this aproach for one of our client, I belive that time we cound't find the option of Multisite plugin, we used multiple site in the solution.</div><div><br /></div><div>Like </div><div>1. Shared</div><div>2. Site1</div><div>3. Site2</div><div><br /></div><div>We used NPM Workspace to share the content beetwen all the sites, to resolve the dependencies we used next-transpile-module and defined dependencies in packages.json </div><div><br /></div><div>Now, to access the shared site components, we used ComponentFactory.ts which is generated when we run a build.</div><div><br /></div><div>My work colleague, David, has written an excellent blog post on a similar implementation. You can read it here: <a href="https://davegoosem.com/sitecore-jss-multi-site-with-npm-workspaces/">Headless Sitecore JSS Multi-site with NPM Workspaces</a></div><div><br /></div><div><br /></div><p></p><p><b>Best Use Cases</b></p><p><b><u><i>Single-Head Approach:</i></u></b></p><p></p><ul style="text-align: left;"><li>Ideal for scenarios where sites share similar content, branding, and features.</li><li>Suitable for small to medium-sized multisite setups with moderate traffic.</li></ul><p></p><p><b><u><i>Multiple Heads Approach:</i></u></b></p><p></p><ul style="text-align: left;"><li>Recommended for multisite setups with diverse content, branding, and functionality.</li><li>Appropriate for larger-scale implementations where autonomy and scalability are paramount.</li></ul><p></p><p>The choice between a single head serving multiple sites and multiple heads for distinct sites in Sitecore XM Cloud hinges on the specific requirements and characteristics of your multisite architecture. Carefully assess the unique needs of your organization, considering factors such as scalability, customization, and management efficiency, to determine the most suitable approach for your multisite setup.</p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-45602353965282399582023-10-03T14:59:00.000-07:002023-11-29T04:32:23.266-08:00Navigating Sitecore XM Cloud Prompts: Understanding Organization Tiers and Project Limits<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij0cCZEhaEa1R2T2Qhzk1SCC3bcjKMojcOJa1MNU2o5Gb_yyH0a5Sv6Pe6ilFf-Jz-sYHDMCg2fUDpS-V_fTbSI8DAO60BCPbG6S8P2IHOL_ha3Rz-fY_RHRoFGnI7tts4s1To76aLexM6IwndLWNF2KkFCKWCrNK1mYIWxNnF2WSTxlUk8_7hjFL44Tc/s961/XM%20Cloud.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="540" data-original-width="961" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij0cCZEhaEa1R2T2Qhzk1SCC3bcjKMojcOJa1MNU2o5Gb_yyH0a5Sv6Pe6ilFf-Jz-sYHDMCg2fUDpS-V_fTbSI8DAO60BCPbG6S8P2IHOL_ha3Rz-fY_RHRoFGnI7tts4s1To76aLexM6IwndLWNF2KkFCKWCrNK1mYIWxNnF2WSTxlUk8_7hjFL44Tc/w640-h360/XM%20Cloud.png" width="640" /></a></p><p>Sitecore, a leading digital experience platform, empowers organizations to create seamless and personalized digital experiences. One of the essential features of Sitecore is the ability to organize projects into different tiers within the platform. However, users may encounter a limitation known as the "Organization Tier Project Limit," preventing them from adding more projects. In this technical blog, we'll delve into this issue, exploring its implications and offering potential solutions.</p><p><b>Understanding Organization Tiers:</b></p><p>Sitecore's organizational structure involves the use of tiers to categorize projects. The organization tier serves as the highest level, under which various projects are organized. Each tier represents a level of hierarchy within the platform, allowing for efficient management of digital assets, content, and configurations.</p><p><b>The Challenge: Project Limitation in the Organization Tier</b></p><p>Users often face a roadblock when attempting to add more projects to the organization tier. The platform imposes a project limit within this tier, hindering scalability for organizations with extensive digital initiatives. This limitation may stem from various factors, including licensing constraints, resource allocation, or architectural considerations.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaSx6maNhm-THJM3D9e9r5YAZMsrvTw41-JdgEH1eDM2NVtyMM-ryBDo3dfhvQwdKiNVUioHs1czcWXN68WPp03fzlv28kCrjnAedML65TiJG7C41x6C8lzjiYjT_d4O1R87fT16gTwpO95L9QMy-rJBjUqqDuWqjTj7AOntG-4qYMdwqQiOENtxA78BE/s1130/Error%20Sitecore.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="598" data-original-width="1130" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaSx6maNhm-THJM3D9e9r5YAZMsrvTw41-JdgEH1eDM2NVtyMM-ryBDo3dfhvQwdKiNVUioHs1czcWXN68WPp03fzlv28kCrjnAedML65TiJG7C41x6C8lzjiYjT_d4O1R87fT16gTwpO95L9QMy-rJBjUqqDuWqjTj7AOntG-4qYMdwqQiOENtxA78BE/w640-h338/Error%20Sitecore.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p><b>Impact on Organizations:</b></p><p>The project limit within the organization tier can have significant implications for organizations aiming to expand their digital presence. As organizations evolve, they may require the ability to create and manage additional projects within Sitecore to accommodate new initiatives, campaigns, or product launches. The imposed limitation can impede agility and hinder the seamless execution of digital strategies.</p><p><b>Possible Solutions:</b></p><p>Review Licensing and Editions:</p><p>Ensure that your Sitecore license supports the desired number of projects within the organization tier. Different Sitecore editions may have varying limits, and upgrading to a higher edition might be a solution.</p><p><b>Optimize Existing Projects:</b></p><p>Evaluate the projects within the organization tier to identify opportunities for optimization. Removing redundant or obsolete projects can free up space for new initiatives.</p><p><b>Engage Sitecore Support:</b></p><p>If the project limitation persists, reaching out to Sitecore Support can provide insights into the specific constraints and potential solutions. Sitecore Support can offer guidance on best practices and assist in resolving licensing or configuration issues.</p><p><b>Conclusion:</b></p><p>The project limit within the Sitecore organization tier is a critical consideration for organizations seeking to scale their digital initiatives. By understanding the factors contributing to this limitation and implementing the suggested solutions, organizations can overcome challenges and continue leveraging Sitecore's powerful capabilities for creating compelling digital experiences. Regularly reviewing licensing, optimizing existing projects, and engaging with Sitecore Support are essential steps in ensuring a seamless and scalable digital experience platform.</p><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><p></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-73780451968833437582023-09-15T06:02:00.000-07:002024-03-06T18:12:53.511-08:00Elevating Sitecore XM Cloud Development: Automating IIS Service Stop in Docker with Up.ps1<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibYR6CIPy5gAYvD_fXXY9SMor_n_zqjw2tSS6WaSZYVRH8nJbEvyaHRfXphR6-Y6X528KTNN6EYShfJWGcHkxeP2MXO2uLwmdEu4fyheYn6cXa6_FGM8buLpKvHiy1XDcf43RJuoRmcJ4S_RlEza6xrMwFiaipczUxaLZLF1yz32U3YqiefLbqrbDmSz4/s1841/Setup.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1044" data-original-width="1841" height="362" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibYR6CIPy5gAYvD_fXXY9SMor_n_zqjw2tSS6WaSZYVRH8nJbEvyaHRfXphR6-Y6X528KTNN6EYShfJWGcHkxeP2MXO2uLwmdEu4fyheYn6cXa6_FGM8buLpKvHiy1XDcf43RJuoRmcJ4S_RlEza6xrMwFiaipczUxaLZLF1yz32U3YqiefLbqrbDmSz4/w640-h362/Setup.png" width="640" /></a></div><br /><p></p><p>Efficient development workflows are essential for a seamless Sitecore XM Cloud experience, especially when working with Docker. In this blog post, we'll explore a simple yet powerful improvement to development efficiency by automating the stopping of IIS services using the Up.ps1 script in a Sitecore XM Cloud Docker environment.</p><p><b><u><i>Script</i></u></b></p><p># Stop IIS Services</p><p>Write-Host "Stopping IIS Services" -ForegroundColor Green</p><p>try {</p><p> # Attempt to stop IIS Service</p><p> Invoke-Expression -Command .\scripts\StopIISServices.ps1</p><p>} catch {</p><p> # Handle the exception if the script file doesn't exist or any other error occurs</p><p> Write-Host "An error occurred: $($_.Exception.Message)" -ForegroundColor Red</p><p> # You can add additional error handling or log the error here</p><p>}</p><p><b><u>Benefits</u></b></p><p>1. Time Savings:</p><p>Manually stopping IIS services can be time-consuming, especially during iterative development. Automating this process with the Up.ps1 script reduces downtime and accelerates the development cycle.</p><p>2. Consistency Across Environments:</p><p>Developers often work in varied environments. Automating the IIS service stop ensures consistency in the development process, irrespective of individual setups.</p><p>3. Error Handling:</p><p>The script incorporates error handling to gracefully manage scenarios where the StopIISServices.ps1 script is missing or if any other unexpected error occurs. This proactive approach helps developers quickly identify and resolve issues.</p><p>4. Integration with Docker Workflow:</p><p>This automation aligns seamlessly with Docker-based workflows. Whether starting or stopping containers, the Up.ps1 script becomes a central point for managing the development environment.</p><p><b>Implementation Steps</b></p><p>Ensure Proper Script Setup:</p><p>Confirm that the StopIISServices.ps1 script is correctly configured and present in the specified location.</p><p>Integrate with Docker Compose:</p><p>Incorporate the execution of Up.ps1 in your Docker Compose file. This ensures that the IIS services are automatically stopped whenever the development environment is brought up.</p><p><b>Conclusion</b></p><p>Automating the IIS service stop in Sitecore XM Cloud within a Docker environment significantly enhances development efficiency. By seamlessly integrating this functionality into the Up.ps1 script, developers can enjoy a smoother, more consistent, and error-resilient development experience. Consider implementing this enhancement in your Sitecore XM Cloud projects to streamline your Docker-based development workflows.</p><p><br /></p><p>Here is the script for the reference - https://drive.google.com/drive/folders/1kVrrFQiWnJ-sZT2uO3axEDPhuXALHy-_?usp=sharing</p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-80437637795549644942023-08-10T21:22:00.000-07:002023-11-29T04:55:13.117-08:00Navigating Sitecore JSS Docker : Unpacking the "System Network Error (ambiguous (2 matches)" Conundrum and its Resolution<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOjzMis-Nu4XoJVlrP0KDqpHsYmQKzEivSIDdHZawKSDB67MO0ZAsJLCz9EYo-gpQUy6mxNhrjPaesSeEV_u4QST9cyWbBM2CjWLBKE-ypGjH3pfKVyw8Qixhi06nUYRS3uD8Xz4sTZg0CgB0fKcuAjLqhyHBIkRDku-1URNPX1UNlUfmNQ3XhytnX4_Q/s1971/Sitecore%20Error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="890" data-original-width="1971" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOjzMis-Nu4XoJVlrP0KDqpHsYmQKzEivSIDdHZawKSDB67MO0ZAsJLCz9EYo-gpQUy6mxNhrjPaesSeEV_u4QST9cyWbBM2CjWLBKE-ypGjH3pfKVyw8Qixhi06nUYRS3uD8Xz4sTZg0CgB0fKcuAjLqhyHBIkRDku-1URNPX1UNlUfmNQ3XhytnX4_Q/w640-h288/Sitecore%20Error.png" width="640" /></a></div><br /><p><br /></p><p>After reinstalling Docker, I encountered a familiar yet confounding error. While Docker is generally renowned for its reliability, this particular issue is relatively common. The error message in question pertained to network management, and I initially tried to address it through conventional Docker commands like listing and removing networks. However, my efforts proved futile, as I received an error message stating that the network was a "system network" and could not be deleted. Frustrated but undeterred, I discovered a remarkably simple solution that may prove helpful to other Docker users in a similar predicament - restarting my machine.</p><p><b>Understanding the Problem:</b></p><p>Docker users often create networks to facilitate communication between containers. These networks are the lifeblood of Docker's infrastructure, enabling the seamless exchange of data and services. However, the "system network" label signifies that a network is essential for Docker's core functionality and cannot be removed through conventional means. This can be a vexing problem for users trying to manage their Docker networks, as the error message seems to deny the basic action of network removal.</p><p><b>The Solution:</b></p><p>When faced with this issue, there are various suggested approaches to resolve it. However, one particularly straightforward and effective method is to restart your machine. Here's a step-by-step guide:</p><p>Save your work and close any active Docker containers or Docker-related applications.</p><p>Proceed to restart your computer or server.</p><p>Once the restart is complete, open Docker and attempt to delete the problematic network using the "docker network rm" command again:</p><p><b><u>docker network rm <network-id></u></b></p><p>In most instances, you'll find that the network can now be removed without encountering the "system network" error message. The restart essentially resets Docker's internal state, resolving any underlying conflicts or issues that may have contributed to the error.</p><p><b>Conclusion:</b></p><p><b><br /></b></p><p>The "system network cannot be deleted" error can be a vexing obstacle for Docker users. Still, as we've explored, <b><u>a simple machine restart</u></b> often proves to be a reliable and efficient solution. Docker is a powerful tool, but it's not immune to the occasional hiccup. Developing the know-how to troubleshoot and resolve such issues is a valuable skill for any Docker user, ensuring a smoother containerization experience.</p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-56133137055930064572023-07-12T03:08:00.000-07:002023-12-03T17:32:55.606-08:00Setup Postman collection for Order cloud<p><b>Introduction</b></p><p>Postman collections are essential for API development as they facilitate testing, documentation, collaboration, automation, and security testing. They help ensure API reliability and performance while enabling efficient team collaboration.</p><p><b>Sitecore Order Cloud offers a default set of APIs.</b></p><p>Steps to setup and access</p><p>Go to this Sitecore Postman collection, Here is the link to access it - OrderCloud API Exercise </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipnTHjbbu7KRpCsF34iLrFDM9jhqwzBPeWWLKtmMYRv4QG6_R_tCZXskxiNH-JBcr30_bd6tF85itg0Pfo6IMJPXKH_NR9Fh7etpf3TgPA6swyufCh7V1f6CfEqzs0Dx_4MgHcMzuZyDymRoE4GOT0X5SOtTAPHHl0jAYjr293eXKwZJJrdc424DQoubo/s2561/Order%20cloud%20PostMan.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1472" data-original-width="2561" height="368" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipnTHjbbu7KRpCsF34iLrFDM9jhqwzBPeWWLKtmMYRv4QG6_R_tCZXskxiNH-JBcr30_bd6tF85itg0Pfo6IMJPXKH_NR9Fh7etpf3TgPA6swyufCh7V1f6CfEqzs0Dx_4MgHcMzuZyDymRoE4GOT0X5SOtTAPHHl0jAYjr293eXKwZJJrdc424DQoubo/w640-h368/Order%20cloud%20PostMan.png" width="640" /></a></div><br /><p>Click "Run" in Postman, which will provide you with the option to open the Postman collection in either your browser or the Postman desktop application.</p><p>It's advisable to establish a Postman team collection that's specific to the project, allowing for easy modification and sharing within the team.</p><p>It's a good practice to setup a new space and do the source control all the key API's and collection so this can be shred withing the team</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZb3mxs1nSvkUC9DnxoH2fd8nKxM6K5FcAEXiLROBvg_83IV5n_DWzuq_5EUEXbq4YV0uknbnHoN_f1i_LnkDxI5co4YV4c_iwftSYU99sjCEFdPx1GPAuorVH1ri25Mu7NtLk8R2W-8shyphenhyphenJ4qteF953lG6t-jmUtIFhrhPngX3Hk7XUqnUmpslfHx2X4/s1537/Post%20Man%20collection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="631" data-original-width="1537" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZb3mxs1nSvkUC9DnxoH2fd8nKxM6K5FcAEXiLROBvg_83IV5n_DWzuq_5EUEXbq4YV0uknbnHoN_f1i_LnkDxI5co4YV4c_iwftSYU99sjCEFdPx1GPAuorVH1ri25Mu7NtLk8R2W-8shyphenhyphenJ4qteF953lG6t-jmUtIFhrhPngX3Hk7XUqnUmpslfHx2X4/w640-h262/Post%20Man%20collection.png" width="640" /></a></div><br /><p><br /></p><p><b>Key Benefits:</b></p><p></p><ul style="text-align: left;"><li>Improved collaboration and knowledge sharing</li><li>Version control for consistent API development</li><li>Reusable components for faster development</li><li>Centralized documentation for easy access</li></ul><p></p><p><b>Practices:</b></p><p></p><ul style="text-align: left;"><li>Create a dedicated Postman workspace for APIs</li><li>Integrate source control to track and revert changes</li><li>Use consistent naming conventions for clarity</li><li>Encourage regular updates to reflect API changes</li><li>Implement code review for quality and consistency</li><li>Establish documentation standards for clarity</li></ul><p></p><p><br /></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-73402619916342874002023-07-07T03:23:00.000-07:002023-11-29T01:33:45.281-08:00Sitecore Xm Cloud - Navigating React Hooks: Addressing useEffect Missing Dependency Warnings and Escaping Quotation Marks<p> Recently I got below error while building and deploying the XM Cloud project</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipbCO0ViEq204pKDAi_FW1IuVS99XCBsYDF8MYOQSYPDEJCFppM1FUor64671Ke8L4Jmxz1hTrIFWXHiUcePgxSHlDUUpJFOBPPWemhFwHINc2_yGJ1TxqskAllDp286G3ZH6hDpbOAxgfh6g6BkspvtXsNz261UFiId8zLm5WCJQsc_H3R4uV7cFCRoQ/s1905/Review.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1006" data-original-width="1905" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipbCO0ViEq204pKDAi_FW1IuVS99XCBsYDF8MYOQSYPDEJCFppM1FUor64671Ke8L4Jmxz1hTrIFWXHiUcePgxSHlDUUpJFOBPPWemhFwHINc2_yGJ1TxqskAllDp286G3ZH6hDpbOAxgfh6g6BkspvtXsNz261UFiId8zLm5WCJQsc_H3R4uV7cFCRoQ/w640-h338/Review.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><p><br /></p><p> +00:00|INFO|114:5 <b>Warning: React Hook useEffect has a missing dependency: 'facets'. Either include it or remove the dependency array. react-hooks/exhaustive-deps</b></p><p>39:13 Error: `"` can be escaped with `&quot;`, `&ldquo;`, `&#34;`, `&rdquo;`. react/no-unescaped-entities</p><p> Error: `"` can be escaped with `&quot;`, `&ldquo;`, `&#34;`, `&rdquo;`. react/no-unescaped-entities</p><p><br /></p><p>to fix this issue for temprary I disabled below settings.</p><div style="background-color: #1f1f1f; color: #cccccc; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div> <span style="color: #9cdcfe;">"@typescript-eslint/no-unused-vars"</span>: <span style="color: #ce9178;">"off"</span>,</div><div> <span style="color: #9cdcfe;">"@typescript-eslint/no-explicit-any"</span>: <span style="color: #ce9178;">"off"</span>,</div><div> <span style="color: #9cdcfe;">"react/no-unescaped-entities"</span>: <span style="color: #ce9178;">"off"</span>,</div><div> <span style="color: #9cdcfe;">"@next/next/no-page-custom-font"</span>: <span style="color: #ce9178;">"off"</span>,</div></div>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-89108059730486161382023-06-14T21:13:00.000-07:002023-11-28T19:27:16.490-08:00Fixing Package Installation Error: Version Conflict in Sitecore CLI<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeUlS6nPVEi9wc5psazH7kkRgWnBCEWDdF7wafCoUP5LpEPGxzXYanWc-q9u8XxVBtPpzvMIgtleAqrLmSs4aZl14LmThsqIw6XnSt5ApWBHW9syx02c_zwhWceSn1HCgcKgP9Y9bKGovdlWIBMUpaXphqsVtA2OBy4rDK4lkyYkg7ACpBI-CpN56F7-g/s952/Issue%20list.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="532" data-original-width="952" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeUlS6nPVEi9wc5psazH7kkRgWnBCEWDdF7wafCoUP5LpEPGxzXYanWc-q9u8XxVBtPpzvMIgtleAqrLmSs4aZl14LmThsqIw6XnSt5ApWBHW9syx02c_zwhWceSn1HCgcKgP9Y9bKGovdlWIBMUpaXphqsVtA2OBy4rDK4lkyYkg7ACpBI-CpN56F7-g/w640-h358/Issue%20list.png" width="640" /></a></div><p>During the initial stages of building my Sitecore project using Bitbucket pipelines, I encountered a critical roadblock: a version conflict with the sitecore.cli package. The error message indicated that the manifest file already contained version 5.1.25, conflicting with the desired version, 5.2.113. To address this, a targeted fix involved updating the dotnet-tools.json file manually. In this technical account, I'll provide a detailed walkthrough of this fix.</p><p><b>The Issue: Version Mismatch in sitecore.cli</b></p><p>The error message "Cannot add package. Manifest file already contains version 5.1.25 of the package sitecore.cli" pinpointed a version conflict during the build process. The challenge was to rectify this conflict, ensuring alignment with the required version, 5.2.113.</p><p><b>The Fix: Updating dotnet-tools.json</b></p><p>1. Locate dotnet-tools.json</p><p>The first step was to navigate to the directory specified in the error message, typically /opt/atlassian/pipelines/agent/build/.config/. Here, the dotnet-tools.json file resides.</p><p>2. Open for Editing</p><p>Once located, I opened the dotnet-tools.json file for editing. This can be achieved through any preferred text editor or integrated development environment (IDE).</p><p>3. Update sitecore.cli Version</p><p>Within the file, I identified the entry for sitecore.cli and manually updated the version number to 5.2.113. This involved changing the existing version, usually set at 5.1.25, to the required version.</p><p>4. Save Changes</p><p>After making the necessary adjustment, I saved the changes to the dotnet-tools.json file, ensuring that the updated version number for sitecore.cli was persisted.</p><p>5. Retry Package Installation</p><p>With the file updated, I retried the package installation process. The purpose was to confirm that the correct version, 5.2.113, was now being utilized without encountering the previous version conflict.</p><p>6. Verify Compatibility</p><p>Before concluding the fix, it was imperative to verify the compatibility of version 5.2.113 with the project's requirements. This involved checking for any additional dependencies or behavioral changes.</p><p>Conclusion</p><p>By strategically editing the dotnet-tools.json file, specifically updating the version of the sitecore.cli package, the version conflict was successfully resolved. This targeted fix allowed for a seamless build process, ensuring that the correct version was utilized during the Sitecore project development within Bitbucket pipelines. The manual edit of the manifest file provides a precise solution for version conflicts, demonstrating the power of nuanced adjustments in the development workflow. As always, adapt these steps to your specific scenario and leverage the broader development community for insights and collaboration. <b>Happy coding!</b></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-11621500980996726332023-06-09T02:54:00.000-07:002023-11-30T15:39:39.281-08:00Unleashing the Power of Sitecore OrderCloud: A Technical Deep Dive<p></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY3w_x5LMuF61pXUefbN0siaWbtIhMvVVP-oL4poegJ1WmojWiZsTs_bVy5TirkQ3I7jOWkFEeA5YarjuzJk-TNk46Ps3eAjhOHd_tCHf8kS-Xi1BhBa8OyJwKryNfjewuZ4rYfeXOubJZuDZlAe3qeAPOh8tSMQDicShl-_F1xsBBT9ix_2reQEeaF_U/s1029/Order%20Cloud%20Image.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="564" data-original-width="1029" height="350" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY3w_x5LMuF61pXUefbN0siaWbtIhMvVVP-oL4poegJ1WmojWiZsTs_bVy5TirkQ3I7jOWkFEeA5YarjuzJk-TNk46Ps3eAjhOHd_tCHf8kS-Xi1BhBa8OyJwKryNfjewuZ4rYfeXOubJZuDZlAe3qeAPOh8tSMQDicShl-_F1xsBBT9ix_2reQEeaF_U/w640-h350/Order%20Cloud%20Image.png" width="640" /></a></div><br /><br /></div><p></p><p><b>Introduction:</b></p><p>Embark on a technical journey into the heart of Sitecore OrderCloud, a robust e-commerce solution seamlessly operating on Microsoft Azure. In this blog post, we explore its microservices architecture, integration points, compliance features, and the intricacies of every interaction through the OrderCloud API. Let's dive in.</p><p><a href="https://mms-delivery.sitecorecloud.io/api/media/v2/delivery/72429ea3-a2fe-42e0-3aa7-08db18bd4ed9/f25b73abec6d4274b91832d1fa609279" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="535" data-original-width="800" height="429" src="https://mms-delivery.sitecorecloud.io/api/media/v2/delivery/72429ea3-a2fe-42e0-3aa7-08db18bd4ed9/f25b73abec6d4274b91832d1fa609279" width="640" /></a></p><p><b>Image Source - <a href="https://mms-delivery.sitecorecloud.io/api/media/v2/delivery/72429ea3-a2fe-42e0-3aa7-08db18bd4ed9/f25b73abec6d4274b91832d1fa609279">Sitecore Order Cloud</a></b></p><p><b>Microservices Architecture and Cloud-Native Approach:</b></p><p>OrderCloud leverages a microservices architecture, embracing the scalability and flexibility offered by cloud-native solutions. We'll dissect the layers of its architecture, exploring how each microservice contributes to the platform's agility.</p><p><b>Integration Points:</b></p><p>Explore the diverse integration points that make OrderCloud a powerhouse in the e-commerce landscape. From data synchronization to third-party service integration, we'll unravel the seamless connectivity that ensures a cohesive e-commerce experience.</p><p><b>Webhooks and Integration Events:</b></p><p>Delve into the world of webhooks and integration events, crucial components for real-time communication and data synchronization. We'll discuss their role in maintaining a synchronized ecosystem, enabling timely updates and actions across the OrderCloud platform.</p><p><b>Security and Compliance:</b></p><p>OrderCloud's commitment to security is evident in its annual SOC 2 Type 2 audits. We'll explore the platform's compliance with GDPR and CCPA, ensuring that businesses using OrderCloud can confidently navigate the complex landscape of data protection and privacy regulations.</p><p><b>User Context in API Interactions:</b></p><p>Uncover the importance of user context in every interaction with the OrderCloud API. We'll discuss how this user-centric approach enhances security, personalization, and overall user experience within the e-commerce ecosystem.</p><p><b>Conclusion:</b></p><p>In this technical exploration, we've scratched the surface of Sitecore OrderCloud's capabilities. From its microservices architecture to robust integration points and unwavering commitment to security and compliance, OrderCloud stands as a testament to the evolution of e-commerce on the cloud. As businesses navigate the digital landscape, understanding the technical intricacies of platforms like OrderCloud becomes paramount for success.</p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-47487925833670926412023-05-17T20:01:00.000-07:002023-11-30T01:02:52.921-08:00Troubleshooting and Resolving Sitecore XM Cloud Deployment Issue: Rendering Host Build Failed<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCI9DBmr15jIDsRPiyXYxfQEbFeuJyZskvmdundMg6jMGjnZDklcvbwByCV-OKsBAA6jGqb-4CrlCsOB58lKTni0viI2C-TEdj72blxS4TFHLwHz-InzXjAUDJardF28PC6Vu_RrkbUKeLu0qW_fgAvR2UIQfa4I9v8ivUiVRRrCfSbBAQC2_RZV_7nuI/s549/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="549" height="524" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCI9DBmr15jIDsRPiyXYxfQEbFeuJyZskvmdundMg6jMGjnZDklcvbwByCV-OKsBAA6jGqb-4CrlCsOB58lKTni0viI2C-TEdj72blxS4TFHLwHz-InzXjAUDJardF28PC6Vu_RrkbUKeLu0qW_fgAvR2UIQfa4I9v8ivUiVRRrCfSbBAQC2_RZV_7nuI/w640-h524/3.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>In this blog post, learn how to identify and resolve problems lurking in your code, like unused variables. We'll explore my personal encounter with this challenge and discuss alternative solutions, including the power of configuration tweaks to disable specific features. Uncover the secrets of efficient debugging and enhance your coding prowess today<p></p><div><pre class="lang-json s-code-block" style="--_cb-line-numbers-bg: var(--black-150); --theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-tag-background-color: initial; --theme-tag-border-color: initial; --theme-tag-color: initial; --theme-tag-hover-background-color: initial; --theme-tag-hover-border-color: initial; --theme-tag-hover-color: initial; --theme-tag-required-background-color: var(--theme-secondary-500); --theme-tag-required-border-color: transparent; --theme-tag-required-color: var(--white); --theme-tag-required-hover-background-color: var(--theme-secondary-400); --theme-tag-required-hover-border-color: transparent; --theme-tag-required-hover-color: var(--white); --theme-topbar-bottom-border: 1px solid var(--black-225); border-radius: var(--br-md); border: 0px; box-sizing: inherit; color: #0c0d0e; font-family: var(--ff-mono); font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--fs-body1); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: var(--lh-md); margin-bottom: calc(1.5em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: var(--su12); vertical-align: baseline; width: auto;"><code class="hljs language-json" style="--theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-tag-background-color: initial; --theme-tag-border-color: initial; --theme-tag-color: initial; --theme-tag-hover-background-color: initial; --theme-tag-hover-border-color: initial; --theme-tag-hover-color: initial; --theme-tag-required-background-color: var(--theme-secondary-500); --theme-tag-required-border-color: transparent; --theme-tag-required-color: var(--white); --theme-tag-required-hover-background-color: var(--theme-secondary-400); --theme-tag-required-hover-border-color: transparent; --theme-tag-required-hover-color: var(--white); --theme-topbar-bottom-border: 1px solid var(--black-225); border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--_pr-code-fs); font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"><span class="hljs-attr" color="var(--highlight-attribute)" style="--theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-tag-background-color: initial; --theme-tag-border-color: initial; --theme-tag-color: initial; --theme-tag-hover-background-color: initial; --theme-tag-hover-border-color: initial; --theme-tag-hover-color: initial; --theme-tag-required-background-color: var(--theme-secondary-500); --theme-tag-required-border-color: transparent; --theme-tag-required-color: var(--white); --theme-tag-required-hover-background-color: var(--theme-secondary-400); --theme-tag-required-hover-border-color: transparent; --theme-tag-required-hover-color: var(--white); --theme-topbar-bottom-border: 1px solid var(--black-225); border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"no-unused-vars"</span><span class="hljs-punctuation" style="--theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-tag-background-color: initial; --theme-tag-border-color: initial; --theme-tag-color: initial; --theme-tag-hover-background-color: initial; --theme-tag-hover-border-color: initial; --theme-tag-hover-color: initial; --theme-tag-required-background-color: var(--theme-secondary-500); --theme-tag-required-border-color: transparent; --theme-tag-required-color: var(--white); --theme-tag-required-hover-background-color: var(--theme-secondary-400); --theme-tag-required-hover-border-color: transparent; --theme-tag-required-hover-color: var(--white); --theme-topbar-bottom-border: 1px solid var(--black-225); border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">:</span> <span class="hljs-string" color="var(--highlight-variable)" style="--theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-tag-background-color: initial; --theme-tag-border-color: initial; --theme-tag-color: initial; --theme-tag-hover-background-color: initial; --theme-tag-hover-border-color: initial; --theme-tag-hover-color: initial; --theme-tag-required-background-color: var(--theme-secondary-500); --theme-tag-required-border-color: transparent; --theme-tag-required-color: var(--white); --theme-tag-required-hover-background-color: var(--theme-secondary-400); --theme-tag-required-hover-border-color: transparent; --theme-tag-required-hover-color: var(--white); --theme-topbar-bottom-border: 1px solid var(--black-225); border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"off"</span></code></pre><pre class="lang-json s-code-block" style="--_cb-line-numbers-bg: var(--black-150); --theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-tag-background-color: initial; --theme-tag-border-color: initial; --theme-tag-color: initial; --theme-tag-hover-background-color: initial; --theme-tag-hover-border-color: initial; --theme-tag-hover-color: initial; --theme-tag-required-background-color: var(--theme-secondary-500); --theme-tag-required-border-color: transparent; --theme-tag-required-color: var(--white); --theme-tag-required-hover-background-color: var(--theme-secondary-400); --theme-tag-required-hover-border-color: transparent; --theme-tag-required-hover-color: var(--white); --theme-topbar-bottom-border: 1px solid var(--black-225); border-radius: var(--br-md); border: 0px; box-sizing: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: var(--lh-md); margin-bottom: calc(1.5em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: var(--su12); vertical-align: baseline; width: auto;"><span style="color: #0c0d0e; font-family: Times New Roman;"><b>Troubleshooting Steps
</b>Troubleshooting Steps
Check ESLint's output for "no-unused-vars" warnings. Identify which variables are reported as unused.
Update TypeScript File:
In your TypeScript file, address the warnings by either using the variables or
removing them if unnecessary.
ESLint Configuration:
Ensure your ESLint configuration includes proper TypeScript rules. Adjust the "no-unused-vars"
rule to match your project's requirements.
After updating the TypeScript file and ESLint configuration, re-run ESLint to verify that
the "no-unused-vars" issues are resolved. By updating the TypeScript file and configuring ESLint
appropriately, you can quickly resolve "no-unused-vars" issues
and maintain a clean and efficient codebase.</span></pre></div>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-86354936081709578752023-04-08T06:11:00.000-07:002023-11-29T04:33:16.499-08:00Resolving the "No CORS Policy Found" Error in Sitecore 10.3 Identity Server<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNV4lF_H8RYtRIjGJbwHp82D4byyWOgVbPW_ef23e0ujOwCf_ELDoKnRlbLwHGypeU1i7NUZeg4h88fEiZth7R_Ebr5qfB8R50gqzLj_qF_6jTYz6cqMVrrPDawUPHMPBNLWVLVw55k_MVAIZVDehAR3cet1mr8U3iTj2hxovHFd_SpUC1KrauF9l7lsY/s1245/Sitecore%20Error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1001" data-original-width="1245" height="514" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNV4lF_H8RYtRIjGJbwHp82D4byyWOgVbPW_ef23e0ujOwCf_ELDoKnRlbLwHGypeU1i7NUZeg4h88fEiZth7R_Ebr5qfB8R50gqzLj_qF_6jTYz6cqMVrrPDawUPHMPBNLWVLVw55k_MVAIZVDehAR3cet1mr8U3iTj2hxovHFd_SpUC1KrauF9l7lsY/w640-h514/Sitecore%20Error.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br />Encountering the Sitecore Identity Server error, specifically the "No CORS policy found for the specified request" issue, can be a frustrating experience for developers and administrators. In this blog post, we'll delve into the details of this error and provide a practical solution to address it.<p></p><p><b><u><i>Error Details:</i></u></b></p><p>The error message points to a problem with the CORS (Cross-Origin Resource Sharing) policy, specifically when the request origin is set to "null," indicating that it doesn't have permission to access the resource. The log entries show the execution of the relevant endpoint in the Identity Server, followed by an unhandled exception related to a SQL Server connection issue.</p><p><b><u><i>Error Log:</i></u></b></p><p>(Sitecore Identity/AA0001) Request origin "null" does not have permission to access the resource.</p><p>(Sitecore Identity/AA0001) No CORS policy found for the specified request.</p><p>(Sitecore Identity/AA0001) Executing endpoint '"Sitecore.Plugin.IdentityServer.Controllers.AccountController.Login (Sitecore.Plugin.IdentityServer)"'</p><p>[INF] (Sitecore Identity/AA0001) Route matched with "{action = \"Login\", controller = \"Account\"}". Executing controller action...</p><p>[INF] (Sitecore Identity/AA0001) Executed action "Sitecore.Plugin.IdentityServer.Controllers.AccountController.Login (Sitecore.Plugin.IdentityServer)" in 16964.3894ms</p><p>[ERR] (Sitecore Identity/AA0001) An unhandled exception has occurred while executing the request.</p><p>System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server...</p><p> ---> System.ComponentModel.Win32Exception (2): The system cannot find the file specified.</p><p><b><u><i>Solution:</i></u></b></p><p>To address this issue, follow these steps:</p><p><b><u><i>Investigate the CORS Policy:</i></u></b></p><p>Check your Sitecore configuration and ensure that the CORS policy is correctly configured to allow the specified request origin. Review Sitecore documentation and relevant articles to verify the proper CORS setup.</p><p><b><u><i>Review External Resources:</i></u></b></p><p>The provided Sitecore Stack Exchange link (https://sitecore.stackexchange.com/questions/19242/what-does-this-error-message-in-the-identity-server-logs-mean) can offer valuable insights into similar issues. Explore discussions and solutions from the community.</p><p><b><u><i>Check SQL Server Services:</i></u></b></p><p>In the presented solution, the root cause was identified as SQL Server services not running. Validate the status of your SQL Server services and restart them if necessary. Ensure that SQL Server is configured to allow remote connections and that the instance name is correct.</p><p><a href="https://jitendrasoni.blogspot.com/" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="370" data-original-width="2125" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEginpBqDoeYy5-1R3byFUuQFElSa-e5p9ikuusdkxoZo10uUJsSxxvuklkmEq415GIMfIilD1unNDUsno8NtCGGiHO936IVjZlMPJjqIOkXDy2vbJHvo_itU-Urug6WhgxO4yVSTFfacdC84KBVeVb2i86Ab2ZjkxR23_2gnQjZaBtKAOUuQtqH7mgIHH4/w640-h112/SQL%20Service.png" width="640" /></a></p><p><b><u><i>Conclusion:</i></u></b></p><p>Resolving the "No CORS policy found for the specified request" issue in Sitecore Identity Server involves a comprehensive approach. By investigating the CORS policy, reviewing external resources, and addressing potential SQL Server service issues, you can successfully mitigate this error. Remember to adapt these steps based on your specific environment and configurations.</p><p><br /></p><br /><p><br /></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-37584150994613742982023-03-06T17:00:00.000-08:002023-11-29T04:49:55.385-08:00Overcoming Sitecore CLI Plugin Installation Hurdles: Resolving "dotnet-tools.json came from another computer and might be blocked" Error in Sitecore JSS<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikEQnHRzp3lU1ZtZl-_wJDK52xm0gM-b_tEWhQs9WcjOiR_0GTEPe-MX0RAaGSR4KikksBOyoSzXk_-FoQ-BuL9pc8YN1n8ZEcgmwXQhkW-78EQwBNw1SxSfP8NqdkeOP1sRYSX_KFz5oUcZhrCI-lQC0QoyQmG9j9UV7QHESmRizxiMnT0FqRz3qltao/s2082/Error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1128" data-original-width="2082" height="346" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikEQnHRzp3lU1ZtZl-_wJDK52xm0gM-b_tEWhQs9WcjOiR_0GTEPe-MX0RAaGSR4KikksBOyoSzXk_-FoQ-BuL9pc8YN1n8ZEcgmwXQhkW-78EQwBNw1SxSfP8NqdkeOP1sRYSX_KFz5oUcZhrCI-lQC0QoyQmG9j9UV7QHESmRizxiMnT0FqRz3qltao/w640-h346/Error.png" width="640" /></a></div><p><br /></p><p>When installing Sitecore CLI Plugins, you may receive the following error:</p><p><br /></p><p><b>File .config\dotnet-tools.json came from another computer and might be blocked to help protect this computer. For more information, including how to unblock, see https://aka.ms/motw</b></p><p>This error occurs when the .NET tool installer detects that the dotnet-tools.json file is from a different computer. This is a security feature to help protect your computer from malicious code.</p><p><b><u><i>Solution</i></u></b></p><p>To fix this error, you can take the following steps:</p><p>Back up the dotnet-tools.json file.</p><p>Recreate the dotnet-tools.json file.</p><p>Update the content of the dotnet-tools.json file to include the Sitecore CLI Plugins that you want to install.</p><p>Run the following command to install the Sitecore CLI Plugins:</p><p>dotnet tool install sitecore.cli</p><p>Example</p><p><br /></p><p># Back up the `dotnet-tools.json` file</p><p>copy dotnet-tools.json dotnet-tools.json.backup</p><p><br /></p><p># Recreate the `dotnet-tools.json` file</p><p>new-item -itemtype file -path dotnet-tools.json</p><p><br /></p><p># Update the content of the `dotnet-tools.json` file</p><p>$tools = @{</p><p> {</p><p> "name": "Sitecore.CLI",</p><p> "version": "5.1.25"</p><p> }</p><p>}</p><p><br /></p><p>Out-File -FilePath dotnet-tools.json -InputObject $tools -Encoding ascii</p><p># Install the Sitecore CLI Plugins</p><p><b><u><i>Conclusion</i></u></b></p><p>Once you have followed these steps, you should be able to install the Sitecore CLI Plugins without any errors.</p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-57759800966402281252023-02-05T18:49:00.001-08:002023-11-30T15:30:52.551-08:00How I fixed my Sitecore CM instance when it wouldn't come up (Invoke-RestMethod "http://localhost:8079/api/http/routers0<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw_onKgcC_vsgA2RByHeZ0vBbVnqstq4c1hTG7Id2A2Skt4L535bjTQAb8LTgNtbIfdvUey0qUUrll1kxNjid5fpmj4WNDgRIPtpp-u9aeFWLRbFkgrIoMsfUxvW-elnlbmYe0lve8TAEOoyONbN61UhRpNPIq7jbH-vFrlhOH0fvBBNCmHetXXthxFFY/s1042/Sitecore%20JSS%20and%20Docker.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="586" data-original-width="1042" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw_onKgcC_vsgA2RByHeZ0vBbVnqstq4c1hTG7Id2A2Skt4L535bjTQAb8LTgNtbIfdvUey0qUUrll1kxNjid5fpmj4WNDgRIPtpp-u9aeFWLRbFkgrIoMsfUxvW-elnlbmYe0lve8TAEOoyONbN61UhRpNPIq7jbH-vFrlhOH0fvBBNCmHetXXthxFFY/w640-h360/Sitecore%20JSS%20and%20Docker.png" width="640" /></a></div><p></p><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>My Sitecore CM instance wasn't coming up, and I was getting the following error:</div><div><br /></div><div>Write-Error: Timeout waiting for Sitecore CM to become available via Traefik proxy. Check CM container logs</div><div><br /></div><div>I checked the Docker logs and found that the issue was with the license file path. The license file was located on a different drive than the one that Sitecore was expecting.</div><div><br /></div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9toAi4c_UI8UbF_2EERuXDxaa0dPUc6K-hYAp77J12YM5QNQJlMrd8F2quEB2cAg6VJk522788-aubkTb-vKi00c7Hnu_wLFWRRndsy9qNmWXvFYjX-ivai1OLn4Mf4AcAxDaQqKRGnnJtYAUnYYNRgdJ3rgDU-M4JGZyc-0R2MuG2Nqzpq-swiL1Ibk/s1386/Sitecore%20Invoke%20Error.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="457" data-original-width="1386" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9toAi4c_UI8UbF_2EERuXDxaa0dPUc6K-hYAp77J12YM5QNQJlMrd8F2quEB2cAg6VJk522788-aubkTb-vKi00c7Hnu_wLFWRRndsy9qNmWXvFYjX-ivai1OLn4Mf4AcAxDaQqKRGnnJtYAUnYYNRgdJ3rgDU-M4JGZyc-0R2MuG2Nqzpq-swiL1Ibk/w640-h212/Sitecore%20Invoke%20Error.png" width="640" /></a></div><div>To fix the issue, I did the following:</div><div><br /></div><div>Deleted all the Docker containers.</div><div>Initialized the Sitecore instance again.</div><div>Set the license file path using the following command:</div><div>setx HOST_LICENSE_FOLDER D:\\license</div><div>Ran the up script to start the Docker containers.</div><div>After following these steps, the Sitecore CM instance came up and I was able to log in.</div><div><br /></div><div>If you're having trouble getting your Sitecore CM instance to come up, be sure to check the license file path and make sure it's set correctly.</div><p><br /></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-68211586521687489022023-01-15T15:32:00.001-08:002023-11-29T04:41:24.261-08:00Troubleshooting Sitecore JSS: Resolving the "Provided SSC API Key is Not Valid" Error<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp0MF6YVQxxpl3MSV9jJbYtQ7ZAY4Q9R7JvZeH-QAD9MOhcJPq5EX44fcf7LF_4P3wTOh2stlbyZ3pwnITODYfL5WueeNN_Rk9Clkerjj2zZ9eCvE2dubqLuogQeH4jxBxlxZJ1OjhtAIG6tgNHZv9xjgxUgmqJmwxdff_g0nBmKjPMQoOdXuV4Cj1DIQ/s1082/Errors.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1036" data-original-width="1082" height="612" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp0MF6YVQxxpl3MSV9jJbYtQ7ZAY4Q9R7JvZeH-QAD9MOhcJPq5EX44fcf7LF_4P3wTOh2stlbyZ3pwnITODYfL5WueeNN_Rk9Clkerjj2zZ9eCvE2dubqLuogQeH4jxBxlxZJ1OjhtAIG6tgNHZv9xjgxUgmqJmwxdff_g0nBmKjPMQoOdXuV4Cj1DIQ/w640-h612/Errors.png" width="640" /></a></div><p>Recently, while doing another setup, I got this error </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv19enfMP9RGd6dB550CsyDvuF6BoUDEJ271c0NOyRXrXu38HntsVsa744pxr4aaS0z_QyYMx6N4LDQDC1kCcRAiiQhPhSMfpXa_hWfajlgdcQxbTkx7wi-mx5njo7GwMod7AiBOhmyUw1wO8EViUVrPRlK78wOBr0lu0lZQgc3wAT4FIHl3dnImy7zu4/s1388/Jss%20Error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="721" data-original-width="1388" height="333" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv19enfMP9RGd6dB550CsyDvuF6BoUDEJ271c0NOyRXrXu38HntsVsa744pxr4aaS0z_QyYMx6N4LDQDC1kCcRAiiQhPhSMfpXa_hWfajlgdcQxbTkx7wi-mx5njo7GwMod7AiBOhmyUw1wO8EViUVrPRlK78wOBr0lu0lZQgc3wAT4FIHl3dnImy7zu4/w640-h333/Jss%20Error.png" width="640" /></a></div><br /><p>Solution - First try to hit this URL </p><p>It's related with the Jss API, make sure that you have created a new API key here </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi5onVoOk1FHrKqBOQhx3_94DJR88FTT32brVSwfEN4KcUaX8Fnvynw9db45A9aWAM3CKZap3efoQVRSm3FL2oeg5GxP1RIitATcV6FDTQ_ShI1jZwM2cOSeR1vDWafbStYIEM1bJUAm-cPwdSSg9KKWglmhM2r0mfrDieHvxti3eatt0RRY1Eay03laM/s1524/Jss%202%20error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="925" data-original-width="1524" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi5onVoOk1FHrKqBOQhx3_94DJR88FTT32brVSwfEN4KcUaX8Fnvynw9db45A9aWAM3CKZap3efoQVRSm3FL2oeg5GxP1RIitATcV6FDTQ_ShI1jZwM2cOSeR1vDWafbStYIEM1bJUAm-cPwdSSg9KKWglmhM2r0mfrDieHvxti3eatt0RRY1Eay03laM/w640-h388/Jss%202%20error.png" width="640" /></a></div><br /><p>Try to this this URL to confirm if the GraphQL service is running</p><p><a href="https://site.dev.local/sitecore/api/graph/items/master/ui?sc_apikey=%7BFB619FF5-84B4-4904-A8B6-161ADC17DC2B%7D" rel="nofollow noreferrer" style="--_li-fc-hover: var(--theme-link-color-hover, var(--theme-secondary-500)); --_li-fc-visited: var(--theme-link-color-visited, var(--theme-secondary-600)); --_li-fc: var(--theme-link-color, var(--theme-secondary-400)); --theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 210; --theme-base-primary-color-l: 46%; --theme-base-primary-color-s: 77%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: var(--theme-primary-200); --theme-button-color: var(--theme-primary); --theme-button-hover-background-color: var(--theme-primary-100); --theme-button-hover-color: var(--theme-primary-400); --theme-button-outlined-border-color: var(--theme-primary-400); --theme-button-outlined-selected-border-color: var(--theme-primary-500); --theme-button-primary-active-background-color: var(--theme-primary-600); --theme-button-primary-active-color: var(--white); --theme-button-primary-background-color: var(--theme-primary-400); --theme-button-primary-color: var(--white); --theme-button-primary-hover-background-color: var(--theme-primary-500); --theme-button-primary-hover-color: var(--white); --theme-button-primary-selected-background-color: var(--theme-primary-600); --theme-button-primary-selected-color: var(--white); --theme-button-selected-background-color: var(--theme-primary-300); --theme-button-selected-color: var(--theme-primary-600); --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,80%,96%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: hsl(210,8%,85%); --theme-footer-link-caret-color: var(--theme-footer-background-color); --theme-footer-link-color-active: hsl(210,80%,23%); --theme-footer-link-color-hover: hsl(210,77%,36%); --theme-footer-link-color: hsl(210,77%,46%); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: hsl(210,8%,68%); --theme-footer-title-color: hsl(210,8%,5%); --theme-header-background-border-bottom: 0; --theme-header-background-color: hsl(210,80%,96%); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: var(--theme-primary-500); --theme-link-color-visited: var(--theme-primary-600); --theme-link-color: var(--theme-primary); --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-primary-100); --theme-post-owner-new-background-color: var(--theme-primary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-tag-background-color: var(--theme-secondary-100); --theme-tag-border-color: transparent; --theme-tag-color: var(--theme-secondary-500); --theme-tag-hover-background-color: var(--theme-secondary-200); --theme-tag-hover-border-color: transparent; --theme-tag-hover-color: var(--theme-secondary-600); --theme-tag-required-background-color: var(--theme-secondary-500); --theme-tag-required-border-color: transparent; --theme-tag-required-color: var(--white); --theme-tag-required-hover-background-color: var(--theme-secondary-400); --theme-tag-required-hover-border-color: transparent; --theme-tag-required-hover-color: var(--white); --theme-topbar-bottom-border: none; background-color: white; border: 0px; box-sizing: inherit; cursor: pointer; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 15px; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; padding: 0px; user-select: auto; vertical-align: baseline;">https://sitecore103sc.dev.local/api/graph/items/master/ui?sc_apikey={AC48C51E-DDFF-48E5-BA2A-1884CE9CCBF2}</a></p><p>When I hit this URL, I got below error </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPmqsY3bKejjRUVh-pE2sMEzUssRG1-hmAn7fk-xNqFqMaEsGZsKOwJKr-6qMioHW586miIoqVuAPHvaP1qD4fWlZbZBoo14sIqLXKRUgInUgYshQZd237Xx8oxsYt87jxEZ-ydvTHVxmqXpccHpKiX4uM92S4KI62ulb69ljYOjKOnjGz_UEziT0abho/s1529/Error%203.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="924" data-original-width="1529" height="386" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPmqsY3bKejjRUVh-pE2sMEzUssRG1-hmAn7fk-xNqFqMaEsGZsKOwJKr-6qMioHW586miIoqVuAPHvaP1qD4fWlZbZBoo14sIqLXKRUgInUgYshQZd237Xx8oxsYt87jxEZ-ydvTHVxmqXpccHpKiX4uM92S4KI62ulb69ljYOjKOnjGz_UEziT0abho/w640-h386/Error%203.png" width="640" /></a></div><br /><p>Follow this document to setup the GraphQL - https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-headless-development/start-using-sitecore-graphql-api.html</p><p>Here are the steps</p><p><br /></p><p>1. Update this configuration to true </p><p><compilation debug="true">.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP4bXZVhPocw6EqdLHya7LYn2jdQ4uitE_z0ve7VPxE8FoGRmyL0FZ-NB-WO6DnP0OKcA_AA-_RvexYYomnzB6fwEKSmVmUrI7rMidpt7wssoBgylPWpNku_4aifAVAPFYNV_cGl2nfCMnaSfbFh074hf94bTBM-Pt3B6XcWl4ykGWrcr5kDeTe8W18z8/s1110/4%20Error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="582" data-original-width="1110" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP4bXZVhPocw6EqdLHya7LYn2jdQ4uitE_z0ve7VPxE8FoGRmyL0FZ-NB-WO6DnP0OKcA_AA-_RvexYYomnzB6fwEKSmVmUrI7rMidpt7wssoBgylPWpNku_4aifAVAPFYNV_cGl2nfCMnaSfbFh074hf94bTBM-Pt3B6XcWl4ykGWrcr5kDeTe8W18z8/w640-h336/4%20Error.png" width="640" /></a></div><br /><p>Enable the master GraphQL file </p><p></p><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgag7pDyTU6tNMeSzaLu0OA15PGm2sgavnqc7lHO9uqurop6dxNd2kb8QLrgFEhE8lrdwINCooROiwxCsiA6wWy8S5ONvtc55CN-0Ud-T38iGIgS0BgXcrpOFM2k3298LTdA2W3D8kdo08nH81EKvbexTh-NzNdWwI8q5EzVY40RM-IC9SyrsDuOSphL4w/s1087/5%20error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="787" data-original-width="1087" height="464" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgag7pDyTU6tNMeSzaLu0OA15PGm2sgavnqc7lHO9uqurop6dxNd2kb8QLrgFEhE8lrdwINCooROiwxCsiA6wWy8S5ONvtc55CN-0Ud-T38iGIgS0BgXcrpOFM2k3298LTdA2W3D8kdo08nH81EKvbexTh-NzNdWwI8q5EzVY40RM-IC9SyrsDuOSphL4w/w640-h464/5%20error.png" width="640" /></a></div><br /><div>After this change, I got a different error while browing GraphQL service</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjbGlMcmMl83XTy936JjuLRSLVmvmHQOSPmId43XnSeJOSGtC5Do8GPCfSOlUOHrxKZGE93DiK4alsZ8X2Uorl-pHXi53cfn1oOTzS0lq4utDLRSGY0ZQ8dk4pKbUwGqqKxkFYerehHrKkDska2OyOOQegR32HdWHL-CaGoeVvFR8MWcOPcGH-1aU_SKw/s2595/6%20Error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1042" data-original-width="2595" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjbGlMcmMl83XTy936JjuLRSLVmvmHQOSPmId43XnSeJOSGtC5Do8GPCfSOlUOHrxKZGE93DiK4alsZ8X2Uorl-pHXi53cfn1oOTzS0lq4utDLRSGY0ZQ8dk4pKbUwGqqKxkFYerehHrKkDska2OyOOQegR32HdWHL-CaGoeVvFR8MWcOPcGH-1aU_SKw/w640-h256/6%20Error.png" width="640" /></a></div>Now, at this stage, try to hit the GraphQL UI<div><br /><div>https://sitecore103sc.dev.local/sitecore/api/graph/items/master/ui</div><div><br /></div><div>I go this error </div><div><pre style="overflow-wrap: break-word; text-wrap: wrap;">{"errors":[{"message":"Authentication required."}]}</pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicd2MkigBW87P7uigQAgYaJELlKvB6A6PSUEsLHn47rQqAX5EyDqLTd8zbiGIWUxRpNUpLBwZ5Sc8SXhFf8R_aYBuzGEL2M0zqfNzRtTTnIus2j-6875Oh2LYYl1JWwufiSakKghu7esAq6uZ9tgv-JP8oUb4FCkiJxbLps8rv42h0h-g1DwTkfgueah8/s1131/7%20Error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="761" data-original-width="1131" height="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicd2MkigBW87P7uigQAgYaJELlKvB6A6PSUEsLHn47rQqAX5EyDqLTd8zbiGIWUxRpNUpLBwZ5Sc8SXhFf8R_aYBuzGEL2M0zqfNzRtTTnIus2j-6875Oh2LYYl1JWwufiSakKghu7esAq6uZ9tgv-JP8oUb4FCkiJxbLps8rv42h0h-g1DwTkfgueah8/w640-h430/7%20Error.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><pre style="overflow-wrap: break-word; text-wrap: wrap;"><br /></pre></div><div>Make below change to Sitecore.Services.GraphQL.config</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCX0VSOfQ-Rcf8CzA9hKMVdGUlaN7XIl6bskcA4MTSyKzI3ppU51jNL0C4kSn53G_JMOPK_1bD9Il1PRxYkEkmMqRhf_h7H-u-_mKoZZModi_Ap859z2PRjiXiZPuY0QH5l7h1W5AnV3Xkvyiok8KB8NsEtA9P-5PvZg2yNSidM1hAcRgzX7YzeCvONrA/s1639/8%20Error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="783" data-original-width="1639" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCX0VSOfQ-Rcf8CzA9hKMVdGUlaN7XIl6bskcA4MTSyKzI3ppU51jNL0C4kSn53G_JMOPK_1bD9Il1PRxYkEkmMqRhf_h7H-u-_mKoZZModi_Ap859z2PRjiXiZPuY0QH5l7h1W5AnV3Xkvyiok8KB8NsEtA9P-5PvZg2yNSidM1hAcRgzX7YzeCvONrA/w640-h306/8%20Error.png" width="640" /></a></div>Finally to make it work, you have to make the below change (This was the main change in my scenario)</div><div><br /></div><div>Go to </div><div>C:\inetpub\wwwroot\Sitecore103sc.dev.local\App_Config\Sitecore\Owin.Authentication\Sitecore.Owin.Authentication.config</div><div><br /></div><div>add this line </div><div><path>/sitecore/api/graph/items</path> under </siteNeutralPaths></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxVF5vbEiCoRUcMEQZ6BZUMm4NBC49jb9NjMXHzrQxlSOmQY-Dx9LKHk6PNcpmI_fZNa01bC4lPCgCPJNC2rKbfWAgYJTeX7LD053ccNzFOPMA0KtPEwtWaG6PUUcbhSTOPMYCsYGAl4oE48OhPbngtKR_qH1yuY76YTC2tXdd0OfZcYRYdCKW3Yfetik/s1472/10%20Error%20JSS.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="981" data-original-width="1472" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxVF5vbEiCoRUcMEQZ6BZUMm4NBC49jb9NjMXHzrQxlSOmQY-Dx9LKHk6PNcpmI_fZNa01bC4lPCgCPJNC2rKbfWAgYJTeX7LD053ccNzFOPMA0KtPEwtWaG6PUUcbhSTOPMYCsYGAl4oE48OhPbngtKR_qH1yuY76YTC2tXdd0OfZcYRYdCKW3Yfetik/w640-h426/10%20Error%20JSS.png" width="640" /></a></div><br /><div><br /></div><div><div>After that change, I can browser the GraphQL through the UI<br /><br /></div><div>Please note, it's recommned that you should not enable these GraphQL end point on prodution for the security purpose, all these changes I'm doing is just for the local setup.</div><div><br /></div><div>but still, I got the authentication error , I'm running below query</div><div><br /></div><div><br /></div><div><div>query {</div><div> # path can be an item tree path or GUID-based id</div><div> item(path: "/sitecore/content/Experience-Edge/home", language: "en") {</div><div> # items can be cast to a Template type with inline fragments</div><div> ... on AppRoute {</div><div> pageTitle {</div><div> value</div><div> }</div><div> }</div><div> # fields can be cast to a Field type with inline fragments</div><div> field(name: "pageTitle") {</div><div> ... on TextField {</div><div> value</div><div> }</div><div> }</div><div> }</div><div>}</div></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQR_UqHNX6wBf8yao0fFN6WEK9_GEMm9c1j05Y6CT6GizSfBgRgVKd4AFtOGlOyp3dbfz0q1bor-l9Az1v1cmO7EMgbP38LdxbCB9PtILujJymCb9hcPW9hmO86p-2IRAi6Mo-010l0RGZRA-7ztIfB8NXwqA5a3uhA03sHXlLzEeBmtkp4hOl_-ZPKo/s1833/11%20Errors.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="918" data-original-width="1833" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQR_UqHNX6wBf8yao0fFN6WEK9_GEMm9c1j05Y6CT6GizSfBgRgVKd4AFtOGlOyp3dbfz0q1bor-l9Az1v1cmO7EMgbP38LdxbCB9PtILujJymCb9hcPW9hmO86p-2IRAi6Mo-010l0RGZRA-7ztIfB8NXwqA5a3uhA03sHXlLzEeBmtkp4hOl_-ZPKo/w640-h320/11%20Errors.png" width="640" /></a></div><br /><div><br /></div><div>I made the below changes to the API key, related to the CORS but it didn't help </div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixTci8XUsVvVjOPQA0J91oxn6SiuBr4Vdn9zwYUWz82ayVg7OQuPhULhKAzIttpbsMt3UFqNGj1LtCxDW6IefT9QCCqDcIZLSRjtLnsBmNfDHFsPAwD43EM3QA0YdwYD8jPRpCEN4cj1UcKFFPcBupVIn0SRX5c4d0wzJTO4rKdEDMp0C5PUvWipU1Oew/s1423/001Next%20Jss%20Key%20Error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="921" data-original-width="1423" height="414" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixTci8XUsVvVjOPQA0J91oxn6SiuBr4Vdn9zwYUWz82ayVg7OQuPhULhKAzIttpbsMt3UFqNGj1LtCxDW6IefT9QCCqDcIZLSRjtLnsBmNfDHFsPAwD43EM3QA0YdwYD8jPRpCEN4cj1UcKFFPcBupVIn0SRX5c4d0wzJTO4rKdEDMp0C5PUvWipU1Oew/w640-h414/001Next%20Jss%20Key%20Error.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>After this change, I start the JSS application but got the below error </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSaAe7H0tyjDZeWgZyj2oa7n1gBeohfFIn6vqQJl2J42mvx_bCaTt1EF9xmyTF6_d32LDEcYF1k1z22nsYELQDo_YEkgKdrijrRiczEAOFPPVpN6s9mjU2uSTTTrIshyphenhyphen4A9Ab7DCnaMEdE5DHDmILTLarixCI__grA0icYOQRXHbypTh94hxPdNOQEzuU/s1477/2%20GraphQL%20Error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="731" data-original-width="1477" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSaAe7H0tyjDZeWgZyj2oa7n1gBeohfFIn6vqQJl2J42mvx_bCaTt1EF9xmyTF6_d32LDEcYF1k1z22nsYELQDo_YEkgKdrijrRiczEAOFPPVpN6s9mjU2uSTTTrIshyphenhyphen4A9Ab7DCnaMEdE5DHDmILTLarixCI__grA0icYOQRXHbypTh94hxPdNOQEzuU/w640-h317/2%20GraphQL%20Error.png" width="640" /></a></div><br /><div><br /><div><br /></div><div><span face="SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace" style="background-color: white; color: #ff5555; font-size: 14px; font-weight: 700; white-space-collapse: preserve;">rror</span><span face="SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace" style="background-color: white; color: #ff5555; font-size: 14px; font-weight: 700; white-space-collapse: preserve;">:</span><span face="SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace" style="background-color: white; color: #ff5555; font-size: 14px; font-weight: 700; white-space-collapse: preserve;"> </span><span face="SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace" style="background-color: white; color: #ff5555; font-size: 14px; font-weight: 700; white-space-collapse: preserve;">GraphQL.ExecutionError: Error trying to resolve layout. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: root
at Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName)
at Sitecore.Data.ItemResolvers.ItemPathResolver.ResolveItem(String path, Item root)
at Sitecore.Services.GraphQL.EdgeSchema.Queries.LayoutQuery.Resolve(ResolveFieldContext context)
at Sitecore.Services.GraphQL.Schemas.RootFieldType`2.Intercept(ResolveFieldContext context)
at GraphQL.Resolvers.FuncFieldResolver`1.GraphQL.Resolvers.IFieldResolver.Resolve(ResolveFieldContext context)
at GraphQL.Execution.ExecutionStrategy.<ExecuteNodeAsync>d__7.MoveNext()
--- End of inner exception stack trace ---: {"response":{"data":{"layout":null},"errors":[{"message":"GraphQL.ExecutionError: Error trying to resolve layout. ---> System.ArgumentNullException: Value cannot be null.\r\nParameter name: root\r\n at Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName)\r\n at Sitecore.Data.ItemResolvers.ItemPathResolver.ResolveItem(String path, Item root)\r\n at Sitecore.Services.GraphQL.EdgeSchema.Queries.LayoutQuery.Resolve(ResolveFieldContext context)\r\n at Sitecore.Services.GraphQL.Schemas.RootFieldType`2.Intercept(ResolveFieldContext context)\r\n at GraphQL.Resolvers.FuncFieldResolver`1.GraphQL.Resolvers.IFieldResolver.Resolve(ResolveFieldContext context)\r\n at GraphQL.Execution.ExecutionStrategy.<ExecuteNodeAsync>d__7.MoveNext()\r\n --- End of inner exception stack trace ---","locations":[{"line":2,"column":7}],"path":["layout"],"extensions":{"code":"ARGUMENT_NULL"}}],"status":200,"headers":{}},"request":{"query":"query {\n layout(site:\"sitecore-jss-app\", routePath:\"/\", language:\"en\"){\n item {\n rendered\n }\n }\n }"}}</span></div><div><span face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" style="color: #ff5555;"><span style="font-size: 14px; white-space-collapse: preserve;"><b><br /></b></span></span></div><div><div class="separator" style="clear: both; text-align: center;">\</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div>After this change, I restated my system and it started working<br /><div><br /></div></div></div>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-1064840322692536882023-01-09T16:02:00.001-08:002023-11-29T04:29:54.086-08:00Resolving "curl: (6) Could not resolve host: nodejs.org" Error in Dockerized Headless Setup<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKHv9_NoysmzsDgq7RWdsXGM-Dg98UYYvCuWrMSajKj2MYA3A_u-9YZsjSFjVCUL_oukTRMCm5ioay557LEGt1G_A2Yhk6x-3JU-BYRdmI2JmBgjtDOtyf7NroxfwT4A37zbhQRaJg3BF0vw1qk-nhkyH2oK5471D6J0jv5vwCyi4tsj4g25SgAZM6XDQ/s1877/Sitecore%20Error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="1061" data-original-width="1877" height="362" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKHv9_NoysmzsDgq7RWdsXGM-Dg98UYYvCuWrMSajKj2MYA3A_u-9YZsjSFjVCUL_oukTRMCm5ioay557LEGt1G_A2Yhk6x-3JU-BYRdmI2JmBgjtDOtyf7NroxfwT4A37zbhQRaJg3BF0vw1qk-nhkyH2oK5471D6J0jv5vwCyi4tsj4g25SgAZM6XDQ/w640-h362/Sitecore%20Error.png" width="640" /></a><br /><p>Encountering errors during the configuration of a headless setup using Docker can be a stumbling block for developers. In this blog post, we'll address a specific issue where the error "curl: (6) Could not resolve host: nodejs.org" surfaced and explore a straightforward solution to overcome this hurdle.</p><p><b>Error Details:</b></p><p>The error manifested while attempting to run a headless setup with Docker. Despite successfully accessing the Dockerfile at \docker\build\nodejs\Dockerfile through a web browser, the persistent issue persisted, causing frustration and hindering progress.</p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEShKLLPgXA03cDa2WFoN-BixywkBbUY_NonMO4EPcZ6J2lTukEQIGj2Vx0Wki81ChV4Sf4AZz1addy1sAoILA8koUDYGnKdBjF8GjjniUqoWqTr0WAGq9V3yBJmL-kqMhFfG-p8RO0I1AQDcXxM574uA_McTsCXXZce7vi7In3nwXMXgpLRmj627kT00/s1571/Error%2011.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="517" data-original-width="1571" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEShKLLPgXA03cDa2WFoN-BixywkBbUY_NonMO4EPcZ6J2lTukEQIGj2Vx0Wki81ChV4Sf4AZz1addy1sAoILA8koUDYGnKdBjF8GjjniUqoWqTr0WAGq9V3yBJmL-kqMhFfG-p8RO0I1AQDcXxM574uA_McTsCXXZce7vi7In3nwXMXgpLRmj627kT00/w640-h210/Error%2011.png" width="640" /></a></div><p></p><p><b><u><i>Error Log:</i></u></b></p><p>curl: (6) Could not resolve host: nodejs.org</p><p><b><u><i>Solution:</i></u></b></p><p>To resolve this issue, follow these steps:</p><p><b><u><i>Inspect Dockerfile Path:</i></u></b></p><p>Confirm that the path to the Dockerfile (\docker\build\nodejs\Dockerfile) is correct and accessible. Ensure there are no typos or misconfigurations in the file path.</p><p><b><u><i>Check Docker Compose Settings:</i></u></b></p><p>Validate your Docker Compose settings. Specifically, ensure that the Docker Compose V2 option is not checked. Additionally, make sure that the "Use the WSL 2 based engine" option is checked in Docker Desktop.</p><p><b><u><i>Conclusion:</i></u></b></p><p>Addressing the "curl: (6) Could not resolve host: nodejs.org" error involves a careful examination of Docker Compose settings. By ensuring that Docker Compose V2 is unchecked and the WSL 2 based engine is selected in Docker Desktop, you can mitigate this issue and proceed with your headless setup seamlessly.</p><p>Note: This solution is based on the specific environment and conditions encountered. It is recommended to adapt these steps as needed, considering the unique aspects of your development setup.</p><div class="separator" style="clear: both; text-align: center;"><br /></div><br />jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-40506926917393802382022-11-28T04:54:00.001-08:002022-11-28T04:55:06.672-08:00Sitecore personalise and CDP custom implementation to capture additional data<p>Sharing my learning and implementation for the Sitecore CDP</p><p>Recently, I got work to implement the Sitecore CDP to capture the Quiz Question and Answers and when the user subscribe to the site, I need to capture the data, here is a live site.</p>
<!--copy and paste. Modify height and width if desired.-->
<iframe allowfullscreen="" class="embeddedObject shadow resizable" frameborder="0" height="281" mozallowfullscreen="" name="embedded_content" scrolling="no" src="https://www.screencast.com/users/Jitendrasoni4416/folders/Capture/media/f34c04cc-ab9e-49ad-9ce2-a4c29eabca35/embed" style="overflow: hidden;" type="text/html" webkitallowfullscreen="" width="500"></iframe><div><br /></div><div>Sending Q&A data in the below format</div><div><div>{</div><div> "channel":"WEB",</div><div> "type":"VIEW",</div><div> "currency":"AUD",</div><div> "language":"EN",</div><div> "page":"Report",</div><div> "pos":"betheboss",</div><div> "session_data":{</div><div> "answers":[</div><div> {</div><div> "id":"1",</div><div> "value":62,</div><div> "level":1.24,</div><div> "updated":true</div><div> },</div><div> {</div><div> "id":"2",</div><div> "value":50,</div><div> "level":0.41,</div><div> "updated":true</div><div> },</div><div> {</div><div> "id":"3",</div><div> "value":50,</div><div> "level":2.67,</div><div> "updated":true</div><div> },</div><div> {</div><div> "id":"4",</div><div> "value":50,</div><div> "level":2.37,</div><div> "updated":true</div><div> },</div><div> {</div><div> "id":"5",</div><div> "value":50,</div><div> "level":2.77,</div><div> "updated":true</div><div> },</div><div> {</div><div> "id":"6",</div><div> "value":50,</div><div> "level":0,</div><div> "updated":true</div><div> }</div><div> ]</div><div> },</div><div> "browser_id":"fa46222c-aeb4-48c5-89c3-8631df2c4237"</div><div>}</div></div><div><br /></div><div>and it got capture in the CDP - it can be found in the debug tab, search for the newly created contact.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTNkgha9wgOphvDR8SndaFXPw-FNMYBFvI46nGZyTbdRvX1gPrJ3zmllYK2SDx7_mP1SbBJpGFUTlXxcDodgvPc4LFeq2iKsXziyO9y0ukBTtmyxYudGRjm22MDkr20sJLJvcwAhRXUv8u5izBNXAKo0BrWGWD4ttb6W5LOu7XB17KyTjBiNd8zkkv/s3032/Debug1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1557" data-original-width="3032" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTNkgha9wgOphvDR8SndaFXPw-FNMYBFvI46nGZyTbdRvX1gPrJ3zmllYK2SDx7_mP1SbBJpGFUTlXxcDodgvPc4LFeq2iKsXziyO9y0ukBTtmyxYudGRjm22MDkr20sJLJvcwAhRXUv8u5izBNXAKo0BrWGWD4ttb6W5LOu7XB17KyTjBiNd8zkkv/w640-h328/Debug1.png" width="640" /></a></div><br /><div><br /></div><div>Here are the list of all the events</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisZx-NQEQTObLmEQK1LbRkFmu8kqYqkxXTjWpN088058iap2Nv5rV1LaCXaf-RjdOFa-AoJEUP3mFpB6HXa9et7tjc-xpaOzUDz8b0kpMt6AlsFB6rVGLhQ572METKSVd2NF4EiZ0Fo9QVfr6pR8E0HZiQdDHWtlebIUhlhRTNZW4bs1rqZzA7C1zP/s2989/Events.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="781" data-original-width="2989" height="168" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisZx-NQEQTObLmEQK1LbRkFmu8kqYqkxXTjWpN088058iap2Nv5rV1LaCXaf-RjdOFa-AoJEUP3mFpB6HXa9et7tjc-xpaOzUDz8b0kpMt6AlsFB6rVGLhQ572METKSVd2NF4EiZ0Fo9QVfr6pR8E0HZiQdDHWtlebIUhlhRTNZW4bs1rqZzA7C1zP/w640-h168/Events.png" width="640" /></a></div><br /><div><br /></div><div>Here is the detals of the capture data</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtl5x9Q_16QG4iT0gO619kWjiBmAg6E8CUQQs1ZUfjUoTe41oycjQLNRV6yrVlIacKoyldv416hNR21OInoqKvCGcrHlxNsPOoSCgp-_YYmhUVV2KFYW_j_j5zFskqkYPCXWOZHuKl3ysLpPYdpSyogQnq0N58QeSs_Rb0ycEWwCxONCuKxGOiiGLU/s3076/Captured%20Data.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2090" data-original-width="3076" height="434" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtl5x9Q_16QG4iT0gO619kWjiBmAg6E8CUQQs1ZUfjUoTe41oycjQLNRV6yrVlIacKoyldv416hNR21OInoqKvCGcrHlxNsPOoSCgp-_YYmhUVV2KFYW_j_j5zFskqkYPCXWOZHuKl3ysLpPYdpSyogQnq0N58QeSs_Rb0ycEWwCxONCuKxGOiiGLU/w640-h434/Captured%20Data.png" width="640" /></a></div><div><br /></div>Impleementation details - I used axios utility to interact with the Sitecore CDP apis<div><br /></div><div>Here is the sample code</div><div><pre style="overflow-wrap: break-word; white-space: pre-wrap;">/* eslint-disable no-return-assign */
import axios from "axios";
export function GetBrowserId() {
if (window?.Boxever && window?.Boxever?.getID()) {
const result = window?.Boxever?.getID();
return result;
}
}
export function PushIdentifyEvent({ event, onSuccess }) {
const browserID = GetBrowserId();
event.browser_id = browserID;
const message = JSON.stringify(event);
const clientKey = process.env.REACT_APP_CLIENT_KEY;
const boxeverAPIEndpoint = `https://api-ap-southeast-2-production.boxever.com/v1.2/event/create.json?client_key=${clientKey}&message=${message}`;
axios
.get(boxeverAPIEndpoint)
.then(function (response) {
onSuccess(true);
})
.catch(function (error) {
// handle error
});
}</pre><pre style="overflow-wrap: break-word; white-space: pre-wrap;"><br /></pre><pre style="overflow-wrap: break-word; white-space: pre-wrap;">On Success, Used below code to send the message</pre><pre style="overflow-wrap: break-word; white-space: pre-wrap;"><div style="background-color: #fffffe; font-family: ui-monospace, SFMono-Medium, "SF Mono", "Segoe UI Mono", "Roboto Mono", "Ubuntu Mono", Menlo, monospace; font-size: 13px; line-height: 18px; white-space: pre;"><div><span style="color: #091e42; font-weight: bold;">export</span> <span style="color: #091e42; font-weight: bold;">default</span> <span style="color: #091e42; font-weight: bold;">function</span> <span style="color: #202020;">CardSuccess</span>() {</div><div> <span style="color: #091e42; font-weight: bold;">const</span> <span style="color: #202020;">totals</span> = <span style="color: #202020;">useSelector</span>((<span style="color: #202020;">state</span>: <span style="color: #202020;">RootState</span>) => <span style="color: #202020;">state</span>.<span style="color: #202020;">totals</span>);</div><div> <span style="color: #091e42; font-weight: bold;">const</span> [<span style="color: #202020;">formData</span>, <span style="color: #202020;">setFormData</span>] = <span style="color: #202020;">useState</span>({ <span style="color: #202020;">email</span>: <span style="color: #bf2600;">""</span> });</div><div> <span style="color: #091e42; font-weight: bold;">const</span> [<span style="color: #202020;">success</span>, <span style="color: #202020;">setSuccess</span>] = <span style="color: #202020;">useState</span>(<span style="color: #091e42; font-weight: bold;">false</span>);</div><div> <span style="color: #091e42; font-weight: bold;">const</span> <span style="color: #202020;">onChange</span> = (<span style="color: #202020;">e</span>: <span style="color: #202020;">React</span>.<span style="color: #202020;">ChangeEvent</span><<span style="color: #202020;">HTMLInputElement</span>>): <span style="color: #091e42; font-weight: bold;">void</span> =></div><div> <span style="color: #202020;">setFormData</span>({ ...<span style="color: #202020;">formData</span>, [<span style="color: #202020;">e</span>.<span style="color: #202020;">target</span>.<span style="color: #202020;">name</span>]: <span style="color: #202020;">e</span>.<span style="color: #202020;">target</span>.<span style="color: #202020;">value</span> });</div><div> <span style="color: #091e42; font-weight: bold;">const</span> { <span style="color: #202020;">email</span> } = <span style="color: #202020;">formData</span>;</div><div> <span style="color: #091e42; font-weight: bold;">const</span> <span style="color: #202020;">handleSubmit</span> = (<span style="color: #202020;">e</span>: <span style="color: #202020;">React</span>.<span style="color: #202020;">SyntheticEvent</span>) => {</div><div> <span style="color: #202020;">e</span>.<span style="color: #202020;">preventDefault</span>();</div><div> <span style="color: #091e42; font-weight: bold;">const</span> <span style="color: #202020;">event</span> = {</div><div> <span style="color: #202020;">channel</span>: <span style="color: #bf2600;">"WEB"</span>,</div><div> <span style="color: #091e42; font-weight: bold;">type</span>: <span style="color: #bf2600;">"IDENTITY"</span>,</div><div> <span style="color: #202020;">currency</span>: <span style="color: #bf2600;">"AUD"</span>,</div><div> <span style="color: #202020;">language</span>: <span style="color: #bf2600;">"EN"</span>,</div><div> <span style="color: #202020;">pos</span>: <span style="color: #bf2600;">"betheboss"</span>,</div><div> <span style="color: #202020;">email</span>,</div><div> <span style="color: #202020;">identifiers</span>: [</div><div> {</div><div> <span style="color: #202020;">provider</span>: <span style="color: #bf2600;">"email"</span>,</div><div> <span style="color: #202020;">id</span>: <span style="color: #202020;">email</span>,</div><div> },</div><div> ],</div><div> };</div><br /><div> <span style="color: #202020;">PushIdentifyEvent</span>({ <span style="color: #202020;">event</span>, <span style="color: #202020;">onSuccess</span>: (<span style="color: #202020;">val</span>: <span style="color: #091e42; font-weight: bold;">boolean</span>) => <span style="color: #202020;">setSuccess</span>(<span style="color: #202020;">val</span>) });</div><div> };</div><div><br /></div><div>Also used <span style="color: #202020;">useEffect</span></div><div><span style="color: #202020;"><br /></span></div><div><div style="line-height: 18px;"><div><span style="color: #202020;">useEffect</span>(() => {</div><div> <span style="color: #091e42; font-weight: bold;">if</span> (<span style="color: #202020;">success</span>) {</div><div> <span style="color: #202020;">setFormData</span>({</div><div> <span style="color: #202020;">email</span>: <span style="color: #bf2600;">""</span>,</div><div> });</div><div> }</div><div> }, [<span style="color: #202020;">success</span>]);</div></div></div></div></pre></div>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-71075378151210309022022-02-08T14:52:00.002-08:002022-09-13T16:55:49.960-07:00Most common again - Sitecore 10.2 when running on a diff machine MSBuild: Could not locate executable.<p> I got the solution from a VM and started running on my local machine and got the below error, it's the most common error and to fix it basically we need to set the correct path into the build-config file</p><p> "MSBuildPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\msbuild.exe",</p><p>Diff system has diff VS version installed so make sure that the script has the correct path from your installed VS version</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdPbfxM742wbPz3zm6jFPp7v3Zxh_Mm_cXHj0mdhIZu8Qh0yFEn4ZWGnT_FWzOKB-I-7FEjRUiqZ5LMHSpiSoa6xrNGsNNlXRdupuKtjtIQ4nRXUDz8kIYnwyTko-8x8-Aob3cK9rS5c8czNZBUjYUyOjOKek228TR4VaZ4cPtEWmkjnhWlPzDEDds/s2358/Ms%20Error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1037" data-original-width="2358" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdPbfxM742wbPz3zm6jFPp7v3Zxh_Mm_cXHj0mdhIZu8Qh0yFEn4ZWGnT_FWzOKB-I-7FEjRUiqZ5LMHSpiSoa6xrNGsNNlXRdupuKtjtIQ4nRXUDz8kIYnwyTko-8x8-Aob3cK9rS5c8czNZBUjYUyOjOKek228TR4VaZ4cPtEWmkjnhWlPzDEDds/w640-h282/Ms%20Error.png" width="640" /></a></div><br /><p><br /></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-66711293440164034932022-01-14T02:49:00.001-08:002022-08-23T05:20:52.614-07:00How to add new service Principal - Sitecore Next.jss (Headless) Deployment to web apps<p>I was using the Azure PaasS - so first we need to raise the Sitecore support ticket to generate the Service Principal.</p><p>Here are the steps - Login into the Sitecore Portal and raise the ticket under </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5g-OeOsiBSRsNSRjiovAQGss4EVbqimioc-BSE9WZqx_jIrdn3-CvWjAT24IQXD3146u2i3wk0u45Ctf9wjw15RvjsIHbb1NUM3Ov5zc3vKYnBxIs5We6gn2kHCeALgawR0H_7OmWp25ANOg_s26nLl3jNFBPn75PSTWJw2IRXJlKfCSI4kOgqJM6/s3747/Service%20Request.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1548" data-original-width="3747" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5g-OeOsiBSRsNSRjiovAQGss4EVbqimioc-BSE9WZqx_jIrdn3-CvWjAT24IQXD3146u2i3wk0u45Ctf9wjw15RvjsIHbb1NUM3Ov5zc3vKYnBxIs5We6gn2kHCeALgawR0H_7OmWp25ANOg_s26nLl3jNFBPn75PSTWJw2IRXJlKfCSI4kOgqJM6/w640-h264/Service%20Request.png" width="640" /></a></div>Make sure that this new service principal should also have a shared drive access/ blob storage so you can upload the default artifacts like Jss and SXA packages to pull and upload to the new vanila setup<div><br /></div><div>Search for the option Update Access to Azure - Service Principal</div><div><br /></div><div>This is basically automated process so the moment you raise the ticket, an automated script will be excuted and create the service principal for you.</div><div><br /></div><div>Now, the next step is to login into the Azure portal and create a new connection</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_SAMsaAcUW2h2g8jB8r6zLy5XJaet9YigwRGJNIFAC-6u6xhw8yn9A1KdUrmTa8E3FW_Ru1wnEiu-T-srXxkJmvirnAlSnAo3GmV6KDk18hBrjpB_lXLoqFt-wVmCimhd37L5eRYiFgIr94LCQL-uuE_Lt8HmjIsfobg7WlmoPbuPdL1sbuwtWXvv/s1803/Service%20Principal%20Setup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1803" data-original-width="1443" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_SAMsaAcUW2h2g8jB8r6zLy5XJaet9YigwRGJNIFAC-6u6xhw8yn9A1KdUrmTa8E3FW_Ru1wnEiu-T-srXxkJmvirnAlSnAo3GmV6KDk18hBrjpB_lXLoqFt-wVmCimhd37L5eRYiFgIr94LCQL-uuE_Lt8HmjIsfobg7WlmoPbuPdL1sbuwtWXvv/w512-h640/Service%20Principal%20Setup.png" width="512" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFEXyt4SJ8gzKEUnMaw6lBSCP3JNkhugOXNzCWcyhFdA4YPqltLvEWsITPqaTFmiQYw_5elPlvxoiFZm8RVkEjuzdaW4yMTDyIU15_O5PkUUzOny4zK0uTjaEx23uECYUmxhxeb4imhMhIGDdjVHuMVhUcxLTNra9HAe4_ahbWtSUmRlbJi20CvMVa/s1470/Service%20Principal%20Setup%20Manual.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1380" data-original-width="1470" height="600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFEXyt4SJ8gzKEUnMaw6lBSCP3JNkhugOXNzCWcyhFdA4YPqltLvEWsITPqaTFmiQYw_5elPlvxoiFZm8RVkEjuzdaW4yMTDyIU15_O5PkUUzOny4zK0uTjaEx23uECYUmxhxeb4imhMhIGDdjVHuMVhUcxLTNra9HAe4_ahbWtSUmRlbJi20CvMVa/w640-h600/Service%20Principal%20Setup%20Manual.png" width="640" /></a></div><br /><div><br /></div><div><br /></div><div><br /><p><span style="background-color: white; color: #717171; font-family: ProximaNova, Helvetica, Arial, sans-serif; font-size: 14px; white-space: pre-wrap;">Application (client) ID: is Service Principal Id</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaQ4OOvr4vLXHsOsPj7GLDLHmdwXGBClPCAgZ-0Rcl2pvIdqJceJj7Q77Heu1LlBwmjIkDvhxUizvpBPBkKeb6AYkSz0G5RSWFHqru7oAGigLIp1OneTQaV75ZktN--ds9JcTdrxAtx00uG8TNSs9SSFwif-wVU89dguFthSjxp2pkvYThC93SDxYa/s1761/Verified%20Id.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1470" data-original-width="1761" height="534" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaQ4OOvr4vLXHsOsPj7GLDLHmdwXGBClPCAgZ-0Rcl2pvIdqJceJj7Q77Heu1LlBwmjIkDvhxUizvpBPBkKeb6AYkSz0G5RSWFHqru7oAGigLIp1OneTQaV75ZktN--ds9JcTdrxAtx00uG8TNSs9SSFwif-wVU89dguFthSjxp2pkvYThC93SDxYa/w640-h534/Verified%20Id.png" width="640" /></a></div><br /><span style="background-color: white; color: #717171; font-family: ProximaNova, Helvetica, Arial, sans-serif; font-size: 14px; white-space: pre-wrap;"><br /></span><p></p></div>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-33681061190661199492022-01-12T01:40:00.001-08:002022-08-23T04:44:04.556-07:00Publishing build artifacts failed with an error: Not found PathtoPublish: D:\a\1\s\Website - Sitecore Next.jss (Headless) Deployment to web apps<p> I got another error which is Publishing build artifacts failed with an error: Not found PathtoPublish: D:\a\1\s\Website</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf9iyIgtoJgShXDBDjgaQW7-Yd4x4jL8O-9zSScKF3rvwf50N9qn4rA79EOOm5YnXSBQLMMWFkML8PCyiqoHhCU-rqDFtOFOELNUk1Gpn0jRA8zrik9YB-DqF2xjnh1kDp1KHSMDdNfHiI8zRy0SRWCztdi_kGLMvx2vjLjdO684cNjpF8NEnGsTXk/s2174/Azure%20Publishing%20Issue.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1193" data-original-width="2174" height="352" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf9iyIgtoJgShXDBDjgaQW7-Yd4x4jL8O-9zSScKF3rvwf50N9qn4rA79EOOm5YnXSBQLMMWFkML8PCyiqoHhCU-rqDFtOFOELNUk1Gpn0jRA8zrik9YB-DqF2xjnh1kDp1KHSMDdNfHiI8zRy0SRWCztdi_kGLMvx2vjLjdO684cNjpF8NEnGsTXk/w640-h352/Azure%20Publishing%20Issue.png" width="640" /></a></div><br /><p>I found the issue was related to the correct path configuration in copy and upload azure pipeline</p><p>Copy step should have the correct source path/folder </p><p>and destination path should have syntax like $(Build.ArtifactStagingDirectory)\Sitecore</p><p>and the publish artifacts should have path like this </p><p>$(Build.ArtifactStagingDirectory)\Sitecore\cm</p><p>Copy pipeline</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRjKMzaf684YGTnSegIMNGx5_8B_wkdUsaGXUXwMrmVqOLgQ2WnP1IdW1YwRd-Q9WrNsM3GBkkZiOqIyZXhFbluREKQEFgxQxH5saSTAPxS1TW-dQUeFYqGyMWAXcYUzNx7al_wrqEsD0gMCzAGxsBDgfQ2FOx5fJkom0PXOf3RgCO3AVIuIjCJDvQ/s2873/copy%20path.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="980" data-original-width="2873" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRjKMzaf684YGTnSegIMNGx5_8B_wkdUsaGXUXwMrmVqOLgQ2WnP1IdW1YwRd-Q9WrNsM3GBkkZiOqIyZXhFbluREKQEFgxQxH5saSTAPxS1TW-dQUeFYqGyMWAXcYUzNx7al_wrqEsD0gMCzAGxsBDgfQ2FOx5fJkom0PXOf3RgCO3AVIuIjCJDvQ/w640-h218/copy%20path.png" width="640" /></a></div><br /><p>Upload Pipeline</p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZEXHEuWpwSC7CQfTV2aiiy8eukjh0ZMovoJdgevj-nQ1ffWdrIWUn2uqLBzxjwZKgcbqv6gAwTi1ZjDkCF4CNwA7neKAAR-EWG-fpB-Eu8elVwexWLz5nOj79jSK-XuaK4ASpyMCXIdfuCDf4d6ugVe0c87Z2d-SScu8j50EEBqfxTU--Twv7sgm/s2996/upload.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1167" data-original-width="2996" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZEXHEuWpwSC7CQfTV2aiiy8eukjh0ZMovoJdgevj-nQ1ffWdrIWUn2uqLBzxjwZKgcbqv6gAwTi1ZjDkCF4CNwA7neKAAR-EWG-fpB-Eu8elVwexWLz5nOj79jSK-XuaK4ASpyMCXIdfuCDf4d6ugVe0c87Z2d-SScu8j50EEBqfxTU--Twv7sgm/w640-h250/upload.png" width="640" /></a></div><br /><br /><p></p><p>After the correct configuration, I was able to resolve the issue</p><p><br /></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-80363398057781803422022-01-04T01:17:00.003-08:002022-08-23T03:31:26.164-07:00Couldn't find a debug log in the cache or working directory - Sitecore Next.jss (Headless) Deployment to web apps <p> Recently I got this error in Azure pipeline</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjP0WWygDLemYj5eKkGYmuhaHvUPRO14ntpNmXRYfDsDRUuL797ITG_oUy3pCVBgY4RG7HaCjaRJOiCesWI14xyzuZtHGSvX9S3tRVr6tu1bt7vm5DOolLmvoxtttHZKaBSQm66fQPpmxwiOz8DYOf6pEoTPq-Ng6fX-vwpSiwFJcsGA1MdNqWcXz7w/s2740/NPM%20Error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1399" data-original-width="2740" height="326" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjP0WWygDLemYj5eKkGYmuhaHvUPRO14ntpNmXRYfDsDRUuL797ITG_oUy3pCVBgY4RG7HaCjaRJOiCesWI14xyzuZtHGSvX9S3tRVr6tu1bt7vm5DOolLmvoxtttHZKaBSQm66fQPpmxwiOz8DYOf6pEoTPq-Ng6fX-vwpSiwFJcsGA1MdNqWcXz7w/w640-h326/NPM%20Error.png" width="640" /></a></div><br /><p>Although, this pipeline was working before, I made a few changes in the producation transformation file and basically it's not recongnizing those keywords</p><p>on my local I got the below eroror</p><p>The PUBLIC_URL environment variable '#{PUBLIC_URL}#' is not a valid URL.</p><p>to fix that, I have moved all my transformatio file into a new folder and replaced during the release pipelines.</p><p><br /></p><p><br /></p><p><br /></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-71444337552358308512021-11-08T15:25:00.003-08:002021-11-21T17:01:06.191-08:00Sitecore 8.1 - update configuration from multilingual to English only and handle en in the URL redirect rule<p>Recently, I got a request to fix an urgent issue, the alias was not working for a Sitecore instance 8.1, I investigated this issue and found the language context got changed from en to the alias name.</p><p>How did we identify?</p><p>on the page source code, we keep the language code and while using the alias the language context got changed. I tried a lot to find the root cause that why Sitecore is changing the language to a wired language code from the alias and found that this was a known issue in Sitecore</p><p>Reference - https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0659458</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0uXerp1fTJ041_GXAaYFemWHZsEPr2nrUssVQ355ZPCp1Fvsn7SAIF3yLLF2cnr2qutEV5qDdW64tcUc1ZJcUu8_w6VwBR1uhRQOyaXKZoaSkppxUL0lMzgIAyLlh8seJU0gfRMIbKkk/s1350/Sitecore+8.1+Error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="692" data-original-width="1350" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0uXerp1fTJ041_GXAaYFemWHZsEPr2nrUssVQ355ZPCp1Fvsn7SAIF3yLLF2cnr2qutEV5qDdW64tcUc1ZJcUu8_w6VwBR1uhRQOyaXKZoaSkppxUL0lMzgIAyLlh8seJU0gfRMIbKkk/w640-h328/Sitecore+8.1+Error.png" width="640" /></a></div><br /><p>so the issue was when a letter combination that matches any of the .NET Culture Codes is in that position, it gets resolved as a language (even if the language is not registered for Sitecore XP instance) and is not used to resolve anything else (for example, an alias or an item). If a resolved language is not identified, an error similar to the following appears:</p><p>I applied the first patch to Languages.AlwaysStripLanguage to false, it worked for me but the problem was there were a few existing URLs with EN, and those started giving 404 errors.</p><p>Now, I need to keep all those URLs live, the easiest solution was the redirect rule.</p><p>I got some good references from this link https://community.sitecore.com/community?id=community_question&sys_id=5144e3691b0770d0b8954371b24bcb9d</p><p>and finally added the below configuration on the web. config and that way we have resolved the issue.</p><p><br /></p><p><rewrite></p><p> <rules></p><p><span style="white-space: pre;"> </span><rule name="English Redirect" stopProcessing="true"></p><p><span style="white-space: pre;"> </span><match url="^en/(.*)$" /></p><p><span style="white-space: pre;"> </span><action type="Redirect" url="/{R:1}" /></p><p><span style="white-space: pre;"> </span></rule></p><p> </rules></p><p></rewrite></p><p> </system.webServer></p><p><br /></p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0tag:blogger.com,1999:blog-5526040273082314192.post-30066100558511970062021-10-20T20:35:00.004-07:002021-10-20T20:35:40.885-07:00Sitecore sorting best practices and recommendation.<p>Sometimes applying a simple sorting based on title can create an issue, we need to be very careful about it.</p><p>Applying sorting based on title is not going to work, strange right?</p><p>Let's see this in detail.</p><p>The title is a text general field and the tokenizer will make tokens of the value so logically you can't do sorting on this field</p><p><br /></p><p>In case if we want to do the sorting on the title field, It's recommended to create a copy field which will basically copy the data from the title and move into the target field and make sure that the target field is a string field so it will hold the string value and sorting can be done.</p><p>Example for the text or text general field </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0kWlSYVDGHZkH3QvpzYICIqr9J1nhoLdM_rMYU7OeLCCAAVBxOMGeSPqztS2Uzq5zdI0viyCgX2L_NIk4oFpx6imV-btFceY5rgz5Ndbik7krU1_beX_P3mQHSHhkOUTB2omairg1L58/s1740/Text+General+Field.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="629" data-original-width="1740" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0kWlSYVDGHZkH3QvpzYICIqr9J1nhoLdM_rMYU7OeLCCAAVBxOMGeSPqztS2Uzq5zdI0viyCgX2L_NIk4oFpx6imV-btFceY5rgz5Ndbik7krU1_beX_P3mQHSHhkOUTB2omairg1L58/w640-h232/Text+General+Field.png" width="640" /></a></div><br /><p><br /></p><p><br /></p><p>With string field</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzYsCp39bGTzVRQ0N103BD0mRTcXhmzsZcjQyQ1nat_bvOtfsL8sNRgxaKCO73ECbYR_bPOozFrHZ_PD4GyfIrXlmS7xy_CqiWRAaeqlw8ctSh9sZim0csyjKiADyJKbajE4q7QxsyQrU/s1770/string+field.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="573" data-original-width="1770" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzYsCp39bGTzVRQ0N103BD0mRTcXhmzsZcjQyQ1nat_bvOtfsL8sNRgxaKCO73ECbYR_bPOozFrHZ_PD4GyfIrXlmS7xy_CqiWRAaeqlw8ctSh9sZim0csyjKiADyJKbajE4q7QxsyQrU/w640-h208/string+field.png" width="640" /></a></div><br /><p><br /></p><p>Solution - How to add a copy field - Reference - https://solr.apache.org/guide/6_6/copying-fields.html</p><p><br /></p><pre class="pygments highlight" style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); direction: ltr; font-family: Inconsolata, monospace; font-size: 16px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; padding: 1em; white-space: pre-wrap;"><code data-lang="xml" style="box-sizing: border-box; font-family: Inconsolata, monospace; font-size: 1em; line-height: 1.45;"><span style="box-sizing: border-box; color: green; font-weight: bold;"><copyField</span> <span style="box-sizing: border-box; color: #7d9029;">source=</span><span style="box-sizing: border-box; color: #ba2121;">"cat"</span> <span style="box-sizing: border-box; color: #7d9029;">dest=</span><span style="box-sizing: border-box; color: #ba2121;">"text"</span> <span style="box-sizing: border-box; color: #7d9029;">maxChars=</span><span style="box-sizing: border-box; color: #ba2121;">"30000"</span> <span style="box-sizing: border-box; color: green; font-weight: bold;">/></span></code></pre><p><br /></p><p>Hope this will help to others.</p>jitendrasonihttp://www.blogger.com/profile/18415524074651325141noreply@blogger.com0