Wednesday, December 20, 2023

Sitecore Content Export by PowerShell

Hi All,

We recently received a request requiring us to export the content of different objects in every language. We attempted to accomplish it using Sitecore's "Export Language" default technique.

See the screenshot below for further information.

We aim to use PowerShell for that since we encountered a lot of problems and received unexpected data when we used the default technique. As everyone is aware, PowerShell is an incredibly useful tool that makes it easier to accomplish nearly anything in Sitecore.

We use the script below to extract the content, and it works great for us.

$path = "master:{A27BB959-5281-47EF-HJC9-1C471C43BE3B}"

$fieldName= Get-ItemField -Path $path

@(Get-Item -Path $path -Language *) | Show-ListView -prop $fieldName


But subsequently, we discovered that we also needed additional standard fields to distinguish the values in other languages, so we made a few little adjustments, and the result is shown below.


$path = "master:{A27BB959-5281-47EF-HJC9-1C471C43BE3B}"

$fieldName= Get-ItemField -Path $path

$fieldName += "Language"

$fieldName += "ItemPath"

@(Get-Item -Path $path -Language *) | Show-ListView -prop $fieldName


Similar to the script above, we can use the interactive dialog box—which we covered in our previous blog—to give it a more dynamic feel.

Although we are now limited to using raw code scripts, PowerShell offers unlimited possibilities for automation.

You may all experiment with this to add more movement and interest. Tell me whether you need my assistance, please.

Regards ahead of time.

I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)

Please leave your comments or share this article if it’s useful for you.  






Thursday, July 27, 2023

Transition of Sitecore public feeds from MyGet to NuGet after November 2023

Hi All,


Might few of aware about Sitecore public feed transition from MyGet to Nuget after November 2023.

As that is currently in transition we faced build issue in our project and get to know about this issue.

One we updated the feed as per below link our project build started again without any issues.

For more details follow below link.

https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1002999


I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles. Till that happy Sitecoring :) Please leave your comments or share this article if it’s useful for you. 

Wednesday, July 5, 2023

Sitecore Powershell to search a keyword in all item fields - Part 2

Hi All,

As I promised last time in my previous blog, related to search keywords in all item fields for enhancing the utility, that can be dynamically picked as a value, and we can use that as a tool. To make it more iterative,  I added a few lines of powershell code to make it more iterative, and as a result, we now have a single interactive powershell tool for dynamically searching keywords with a user-friendly display.

Find the script for the same in the section below.

https://github.com/gaurarun777/SitecorePowerShell/blob/main/PowerShellKeyWordSearch-Final.ps1

Here below some screenshots for more understanding:






Please let me know if you require a different version of this as well. I'll make an effort to update it in accordance with the advice. All suggestions are welcome.

I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)

Please leave your comments or share this article if it’s useful for you.




Tuesday, June 27, 2023

Sitecore Powershell to search a keyword in all item fields

Hi All,

These days, there is one requirement for my project, as we are using external links that have different urls for dev, QA, UAT, and live. So to identify the fields that have a specific string url, we need to identify the external links according to the environment. For that, I started the investigation and found one blog very useful.

https://www.logicalfeed.com/posts/1222/powershell-script-to-search-a-keyword-in-all-items-in-sitecore 

But there is one problem in that string what we need to search is hardcoded, so I used Sitecore interactive dialogs.

After a small effort I created the script which you can get from below url:
https://github.com/gaurarun777/SitecorePowerShell/blob/main/PowerShellKeyWordSearch-1.ps1

Which will help you to search a specific string from a certain path. You need to supply the string that needs to be searched and the item path into the interactive dialog box.



In the future, I will try to make it more interactive, suggestions are really appreciated.

I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)

Please leave your comments or share this article if it’s useful for you.


Wednesday, May 10, 2023

Unicorn Serialization Items appear as Ids in file system

 

Hi All,

During these days, I am working on a project where we are using Unicorn to sync the Sitecore items. But I faced weird behavior during the update of items. A few items come as a path, but a few are stored under the parent ID folder in the file system. Like below:

 


 

Ex. highlighted items in the image All come under "GetSupport Form Labels" but as mentioned, two items come under the same parent item in the file system, and the other is stored under the parent item ID folder, even though that is the item ID for the "GetSupport Form Labels" folder.

So I decided to find out the exact configuration for the same, or if that is the issue, then try to resolve it. During my analysis, I found the below Sitecore stack exchange link very useful.

https://sitecore.stackexchange.com/questions/33126/unicorn-serialization-items-appear-as-ids-in-file-system

The above article explains that "there is nothing wrong with our setup. Due to the long file system path, Unicorn decided to keep IDs instead of full paths.

Later, I analyzed this more and found the following very interesting and fruitful, which explain this issue in depth.

https://blogs.perficient.com/2018/10/03/sitecore-unicorn-serialization-paths-too-long-in-azure/

I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)

Please leave your comments or share this article if it’s useful for you.

Monday, May 8, 2023

Sitecore automation for Kick idle or inactive users


Hi All,

Sitecore licensing can be based on the number of concurrent user sessions. To many ideal user, this can create an issue of slowness in Sitecore.

There is a manual way to do kick off ideal users, but I want some automation there that can take care of kicking the ideal user.

I'm facing this scenario in my current project, so I tried to find out a solution. I found the below blogs very useful for the same.


https://www.bugdebugzone.com/2013/10/sitecore-kick-idle-or-inactive-users.html


I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles.


Till that happy Sitecoring :)

Please leave your comments or share this article if it’s useful for you.