Hello All,
Probably bringing back one of the previously asked questions about finding and fixing broken links in AEM. There are some discussions and solutions mentioned eg using groovy script (can't use this currently) and link checker (https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/broken-link-scan/qaq-p/220... and some discussions about disabling link checker because of possible performance issues.
I tried using the linkchecker tool in AEM 6.5 and it was showing a couple external links that I authored incorrectly but not the internal link that was authored incorrectly. Still with the incorrect external links we can't right away find where it has been used but we can do query I suppose (involving devs)
https://www.tadigital.com/insights/perspectives/identify-and-fix-broken-links-aem-link-checker and https://www.tadigital.com/exchange/link-checker/ looks very promising but I am not sure how it is implemented.
Please suggest for following thoughts or any other ideas.
- Periodically, in author go through all nodes (their properties) and check for the authored links and hrefs. Get the paths with broken links or a map of broken link --> affected paths and save it. Add to this a component may be where we can input path/path tree , broken link, updated link
- Keep link checker on in author and utilize etc/linkchecker tool to get the broken links and query the broken links. For broken internal links think of something else
Thanks
Solved! Go to Solution.
This is another idea.
If you have nodeJS installed on your machine, there's a tool that I personally use to scrape through an entire website, checking if there are any broken links. If there are any broken links, you should be able to see the highlighted under-tested page, and which link is broken.
https://www.npmjs.com/package/broken-link-checker
The tool is great, you provide it with the root level of the website, and it will keep traversing down the links from the website, and output results.
The example bellow is reporting generated from https://photoshop.com/en:
Once you download the node plugin, you can simply run something like:
blc https://photoshop.com/en -ro
This is another idea.
If you have nodeJS installed on your machine, there's a tool that I personally use to scrape through an entire website, checking if there are any broken links. If there are any broken links, you should be able to see the highlighted under-tested page, and which link is broken.
https://www.npmjs.com/package/broken-link-checker
The tool is great, you provide it with the root level of the website, and it will keep traversing down the links from the website, and output results.
The example bellow is reporting generated from https://photoshop.com/en:
Once you download the node plugin, you can simply run something like:
blc https://photoshop.com/en -ro
Views
Replies
Total Likes
@Shubham_borole The linkchecker is mostly used to check the external links and does have performance impacts. Moreover it would just check the link but fixing it, is manual. As per your requirement where you need to find the broken link and need a way to update it as well, I would suggest to use sling rewriter pipeline.
Sling provides a way to rewrite the output/generated markup of a page via a pipeline feature and it is activated in AEM by default (used for the AEM-built in link checker and link rewriting features as well). You would have to create a new transformer-type with all the logic that you need to fix the broken link and add it to the rewrite configuration.
Code Examples:
https://www.flexibledesigns.rs/creating-a-link-rewriter/
http://www.wemblog.com/2011/08/how-to-remove-html-extension-from-url.html
Views
Replies
Total Likes
Where to download this link checker tool from TA Digital?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies