In my development Sitecore, I had this strange situation that when I tried to insert a link, the tree would not fold out for certain items:
I can see that I get the following error back from the /-/item/v1/sitecore/shell?sc_itemid= call:
{“statusCode”:500,”error”:{“message”:”Template is null.”}}
With a little bit of searching, it turns out, that this branch of the content tree contains an item with no template:
This reminiscence from a test long lost in time is visible in the content editor, but makes the “Insert Link” window fail.
To delete the item you need to use the good old DbBrowser, a tool found in Sitecore since the dawn of times. You find the tool here:
/sitecore/admin/dbbrowser.aspx
This tool is a near-database tool that allows you to do things that the shell does not. Here you can select the item in question and delete it:
After I deleted the item, the Insert Link works again.
MORE TO READ:
- Troubleshooting Delivery Instances with Db Browser from Vasiliy Formichev
- Sitecore Admin Pages from Sitecore Spark
- Sitecore tree not loading for general link field from Sitecore Community