In real Sitecore projects, you may have to deal with some annoyed issues due to broken links (especially when we follow Helix principles -> there are many renderings per item and there are fresher/junior Sitecore devs in your team).
Sometimes, you will not be able to install your Sitecore packages to other environments if there are the broken links.
I always know that there is a powerful Sitecore module which is probably helpful for me to fix the broken links easily. It’s Sitecore PowerShell Extensions.
At the beginning, I tried playing with Broken Links Report (Note: SPE version 4.7.2). However, it’s lack of information and doesn’t support for multiple broken links per item. It seems that there is a problem with Broken Link Field as well (it’s empty all the time).
Therefore, I tried playing Broken Links Report with PowerShell ISE and it looked better (Broken Link Field is NOT empty per row)
Fortunately, I had a chance to play with the powershell script and I wanted to make my hand dirty by learning and editing /sitecore/system/Modules/PowerShell/Script Library/Content Reports/Reports/Content Audit/Broken Links in order to have a Broken Links Report like this (I call it as Broken Internal Links Report With Additional Info):
How to play with “Broken Internal Links Report With Additional Info”
- download version 4.7.2 (the latest one at this time) of Sitecore PowerShell Extensions and install it to your Sitecore instance via Installation Wizard
- open PowerShell ISE via Sitecore Launchpad
- download this script and then copy / paste it into PowerShell ISE’s editor
- execute it and then provide your credential to access Broken Internal Links Report With Additional Info dialog
- on the dialog, select the options and then press OK to view the report
- hopefully you can see something like this
Personally, I think that I will be a huge fan of Sitecore PowerShell Extensions soon. It makes my job easier. In fact, SPE is the best approach for some special requirements. Big thanks Adam Najmanowicz and Micheal West + other contributors for your great contribution to the Sitecore community.
Please send your issues (with screenshots if possible) to email@example.com so that I have a chance to understand your problem and be able to suggest the solution.
Happy Sitecore Coding!