How to remove broken links in Sitecore

We have a Sitecore site where several elements have broken links to the old working state, which no longer works with us. I know that you delete links when you delete an element, but I don’t see an interface for simply deleting a broken link to an element when the missing element is already gone.

What is the best way to remove broken links in this case? Thanks.

+6
source share
2 answers

There is a Sitecore administration page that allows you to remove broken links. You can find it here:

http://localhost/sitecore/admin/RemoveBrokenLinks.aspx

You simply select the database and complete the action. You can also serialize all items modified during this process.

You may need to change the timeout settings in web.config :

 <setting name="DefaultSQLTimeout" value="10:00:00" /> <setting name="DataProviderTimeout" value="00:00:00" /> 
+8
source

Sitecore maintains a table called Links in the database that is listed in the LinkDatabase section of the web.config file. You can get all broken links as follows:

 Sitecore.Data.Database db = Sitecore.Context.Database; Sitecore.Links.LinkDatabase linkDb = Sitecore.Globals.LinkDatabase; Sitecore.Links.ItemLink[] brokenLinks = linkDb.GetBrokenLinks(db); 
+2
source

Source: https://habr.com/ru/post/983001/


All Articles