The Problem
The Links DB, found by going to Content Editor - Navigate - Links menu, in our environments was rarely up-to-date even after full site publishes and deploys. Content authors worked on an archival project and removed many links to the page item and republished those pages but the links still kept showing up under the Links menu.
The Links menu was consistently found to be unreliable when it comes to identifying where a page is linked. It made it very difficult to know when a page can be archived.
The Research - The process for accessing items under the 'Links' icon.
There are two sections in Links menu - 'Items that the selected item refer to' and 'Items that refer to the selected item' Each of these operate differently.
'Items that the selected item refer to' - retrieves data from the fields of the item in the 'Items' table of the Master database using the Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm.GetReferences method. This method pulls data even if the item has a broken link in the Links table.
'Items that refer to the selected item' - fetches data from the Links table where 'TargetItemID' matches the 'ItemID' of the selected item. This is done using the Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm.GetReferrers method. If there is a broken link, the relationship may not be fetched or displayed in the Content Editor.
Regarding the issue, we discovered numerous broken links in our Links table. Following a rebuild of the Links table, the issue was not reproducible.
One shall also check if there are any errors during last rebuild of the Links database due to which Links DB may not rebuild successfully. Also, one needs to be mindful of any actions that might reintroduce items with broken links (e.g., installing a package with items)
Since the issue did not reoccur for us after the Links database rebuild, we suggest you perform a rebuild periodically.
Got more questions? Feel free to reach out! I am here to help (most of the time).
Happy Sitecoring!
Comments
Post a Comment