⟵ Resources

Sitecore PowerShell Extensions – Playing around with Broken Links Report

CMS

In real Sitecore projects, you may have to deal with some annoying 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).

screenshot of message of broken link in fields control properties screenshot

device editor screenshot workflow screenshot

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

install a package screenshot

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

navigation to broken links report screenshot

broken links report

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

experience platform screenshot open script screenshot

broken links field highlighted

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

broken internal links report

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
    • experience platform screenshot
  3. download this script and then copy / paste it into PowerShell ISE’s editor
    • script screenshot
  4. execute it and then provide your credential to access Broken Internal Links Report With Additional Info dialog
    • broken internal links report with additional info
  5. on the dialog, select the options and then press OK to view the report
    • broken internal links report with additional info 2
  6. hopefully you can see something like this
    • broken internal links report with additional info 3

 

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 [email protected] so that I have a chance to understand your problem and be able to suggest the solution.

Happy Sitecore Coding!

 

 

This article originally appeared on Walking on clouds.

Sitecore PowerShell Extensions – Playing around with Broken Links Report

Sitefinity Cloud Consuming Secret Key From Azure KeyVault

PHP for Dummies: A Straightforward Guide to Web Development

Portfolios

Resources

Contact Us

Website Development Company in Singapore white logo
LowCarbonSG Logo
Terms & Conditions | Privacy Policy | Accessibility Statement

Apply Now!

Upload Resume (with a 2mb maximum file size)
Accepted file types: doc, docx, pdf, xps, Max. file size: 2 MB.
This field is for validation purposes and should be left unchanged.