Surendra Sharma

Surendra Sharma

Search This Blog

Thursday, July 18, 2019

Get all Sitecore page items only by using PowerShell script

We got the requirement to create report of all the items which are accessed by URL i.e. report of all page items.

A simple solution, for this, is to check is rendering exist on the an item or not?
If rendering exists, it means layout and components are assigned on that item. If rendering is empty, it means no layout or no component exists on that item.

You can write a C# code for generating such report but I think PowerShell is the best way to do this.

Here is the one line script for the same

Get-childItem -Path "master:\sitecore\content\home" -Recurse | Where-Object { ($_.__Renderings -ne "") } | Show-ListView -Property id, name, itempath

With this one line you can imagine the power of PowerShell. 

I strongly recommend to brush up your scripting skill.

Friday, July 12, 2019

Webinar on Voice based search with Sitecore GraphQL

I conducted webinar on "Voice based search with Sitecore GraphQL" for SUGNCR group today.

Sample code for this demo is available at  https://github.com/alexksharma/VOICE-BASED-SEARCH-WITH-SITECORE-GRAPHQL

 Watch recording for more details









Friday, July 5, 2019

Fixed: Rebuild Reporting Database failed in Sitecore


We are using Sitecore 8.2 and our analytics data is stored in MongoDB database. Its size is around 50 GB.


From few days, we were not getting data in Sitecore analytics reports so we decided to rebuild reporting database.


We started rebuilding activity, but it fails on 8th days. We tried again, and same thing happen and failed on 8th days.


We started to investigate why its failing specially on 8th days?


Solution:


There is a config setting <TaskEntryAfterLife> in file "Sitecore.Analytics.Processing.config" which by default set for 8 days. 

<!-- TASK ENTRY AFTERLIFE
  Specifies the minimum time a task entry (and all associated data structures) is kept in the task queue after
  the task has executed.
 
  Default: 8.00:00:00
-->
<TaskEntryAfterLife>8.00:00:00</TaskEntryAfterLife>

We changed its entry for 15 days as

<!-- TASK ENTRY AFTERLIFE
  Specifies the minimum time a task entry (and all associated data structures) is kept in the task queue after
  the task has executed.
 
  Default: 8.00:00:00
-->
<TaskEntryAfterLife>15.00:00:00</TaskEntryAfterLife>

After this we again started rebuilding activity and this time it works fine and completed the task on 10th days.


Now we are getting missing data in Sitecore analytics reporting sections.

I hope it helps you to fix the similar issue.

Stay tuned for more such tips and tricks.