utilities

Sitecore PowerShell Extensions – Playing around with Broken Links Report

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).

This slideshow requires JavaScript.

Sometimes, you will not be able to install your Sitecore packages to other environments if there are the broken links.

blr_5

 

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).

This slideshow requires JavaScript.

Therefore, I tried playing Broken Links Report with PowerShell ISE and it looked better (Broken Link Field is NOT empty per row)

This slideshow requires JavaScript.

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):

blr_8.png

 

How to play with “Broken Internal Links Report With Additional Info”

  1. 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
  2. open PowerShell ISE via Sitecore Launchpad
    • blr_9
  3. download this script and then copy / paste it into PowerShell ISE’s editor
    • blr_11
  4. execute it and then provide your credential to access Broken Internal Links Report With Additional Info dialog
    • blr_12.png
  5. on the dialog, select the options and then press OK to view the report
    • blr_13
  6. hopefully you can see something like this
    • blr_8

 

Conclusion

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.

 


Got issues?

Please send your issues (with screenshots if possible) to viet.hoang.sitecore@gmail.com so that I have a chance to understand your problem and be able to suggest the solution.

Happy Sitecore Coding!

 

Advertisement

2 thoughts on “Sitecore PowerShell Extensions – Playing around with Broken Links Report

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.