jbluemink / Find-overwritten-Sitecore-resource-items

IAR Sitecore items can be overwritten by a database item, With the Sitecore PowerShell report you can easy find the item and delete/restore or compare the item as resource

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Find-overwritten-Sitecore-resource-items

  • A Sitecore PowerShell Report for Sitecore IAR items, Items as Resources.
  • Identify Which Items Are From Resource Files (IAR) and Database
  • A Content Editor warning for IAR items and IAR overridden, overwritten items in Sitecore PowerShell
  • A overwritten resource item compare in the Report
  • A overwritten resource item restore/delete in the Report
  • A package resource item in the Report
  • A Items as Resources, IAR Gutter with compare / resource file lookup.

Recent Updates:

  • 30 Sep 2023 Add package option in report.
  • 2 Jan 2024 Add support for core database and web for non XM Cloud
  • 16 March 2024 support fot Azure webapps
  • 30 March 2024 support for multiple file
  • 1 April 2024 add itemdefinition to the compare

PowerShell only

Certainly with Sitecore XM Cloud there is more resistance to extend the Sitecore CMS using c# code in a custom DLL. But with Sitecore PowerShell a lot can be done these tools are completely in Sitecore PowerShell and everything is in Sitecore items no files needed.

For Sitecore 10.2, Sitecore 10.3+ and XM Cloud

IAR Sitecore items can be overwritten by a sql database item, With the Sitecore PowerShell report you can easy find the item and delete/restore the item as resource.

Example

compare-Example See blog

See the Compare in action

See the gutter in action

IAR Content Editor Warning for Sitecore 10.3+ and XM Cloud.

See blog : Item as resources PowerShell Content Editor Warning

Example

IAR Gutter for Sitecore 10.3+ and XM Cloud.

To enable, in Sitecore Shell, bottom left corner start button, click, PowerShell Toolbox, Rebuild script intergration points. Enable IAR Gutter in Sitecore content editor, right mouse click in the left from the Tree, enable IAR Gutter

IAR-Gutter

TODO

  • Add file/item/fields viewer.

Installing

3 options for installing this tool, choose the option you like

option 1) Download and Install the tool, Powershell Report

For just installing and use the tool the easy way is: copy items.master.iaroverwrittenreport.dat to \sitecore modules\items\master of your Sitecore CM instance.

option 2) For using the Sitecore CLI and optional using Visual Studio to edit the module.json

Install Sitecore Command Line Interface

See: Install Sitecore Command Line Interface
Note: You must have .NET 6 installed on your workstation before installing the Sitecore CLI.

#cd {project folder}
cd C:\projects\Find-overwritten-Sitecore-resource-items

dotnet new tool-manifest dotnet nuget add source -n Sitecore https://nuget.sitecore.com/resources/v3/index.json
dotnet tool install Sitecore.CLI --version 5.1.25

#dotnet sitecore init

dotnet sitecore login --authority https://id.{host}.local --cm https://cm.{host}.local --allow-write true

#push item to Sitecore
dotnet sitecore ser push

#pull sitecore item to files
dotnet sitecore ser pull

Generate IAR .dat file

For developers if you made changes and want to update the .dat file dotnet sitecore itemres create -o iaroverwrittenreport

option 3) Install the package zip

first option too much hassle, hey this is even easier with an old fashioned sitecore zip package Download Find-overwritten-Sitecore-resource-items-{DATE}.zip and use the sitecore package installer. In desktop, Development Tools, Installation Wizard

Tips

When you get very quick a Message "The data for the dialog is not available. Either your server was restarted or the server cache was flushed. If this is a recurring problem, contact your system administrator." one reason could be low on memory when running Docker default container size is max 1 GB memory. add mem_limit: 4GB in the docker-compose.override.yml for the CM container.

About

IAR Sitecore items can be overwritten by a database item, With the Sitecore PowerShell report you can easy find the item and delete/restore or compare the item as resource


Languages

Language:C# 100.0%