1

Hello – As I’m working through Sitecore trying to add some pages and delete some, I’m running into this “Breaking Links” error that doesn’t allow me to delete pages I don’t need. For example, I now have two “COPY OF” folders in the content tree because I duplicated a couple, but now can’t delete the duplicates. Below is the error I keep getting.

enter image description here

1
  • Try running "Rebuild Link Database" from Control Panel first
    – Marek Musielak
    Commented Jan 5, 2023 at 20:32

2 Answers 2

0

I'd recommend trying a few options here.

  1. Rebuild Link Database

    Go to Control Panel -> Database -> Click on Rebuild Link Database -> select master and hit rebuild. enter code here

  2. DB Browser - You can find your folder/item from the content tree and hit Delete

URL: http://<yoursite>/sitecore/admin/dbbrowser.aspx enter image description here

The DBBrowser.aspx page is essentially a faster version of the Content Editor. This allows you to browse all items in your Sitecore databases and make basic content updates.

  1. Remove Broken Links

URL:http://<yoursite>/sitecore/admin/RemoveBrokenLinks.aspx

enter image description here

This is pretty straightforward: in one click, all broken links in Sitecore are cleaned up.

Refer to this link for more details:https://www.sitecorespark.com/article/sitecore-admin-pages

Hope it helps!

0

Another way to do this using code behind, Sitecore maintains the table named Links in the database specified in the LinkDatabase section of web.config. You can get all broken links in following way:

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

Also if you want to do it from Sitecore then you can open the remove broken links page.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.