2
votes

First, I made a backup for all items assigned old templates. Then, I created new templates and all items are assigned with the new templates.

After assigning new templates, there was something problem and I moved back to all items assigned old templates.

Then, I tried to remove the new templates, but Sitecore say that "The template is used by at least one item".

I can assume and check all moved back items and no items are using the new templates.

What is the issue??

4
Have you tried rebuilding your Links database? - Trayek
How do I rebuild the links database? - Jay
Log in to the desktop, go to Control Panel -> Rebuild Links database. Also, the issue might appear because of the template having the __standard values. Might be worth removing that and giving it a try if that's also the case? - Trayek
Press navigation tab, Links item, to see the referrers - Jan Bluemink

4 Answers

4
votes

Your template is being used by one or more content items. You can see which items it's using via the links menu:

enter image description here

You need to delete all of these content items before you can delete the template. I don't think there is a quick way of doing this unfortunately

2
votes

I know this is old, but for others that have this issue, yes, the true fix is update the links database so that Sitecore knows the templates aren't actually referenced any longer.

If you actually just wanted to force delete the templates, you can use the SitecoreInstance.com/sitecore/admin/dbbrowser.aspx file to force delete which BYPASSES the built in check.
Note - if you use this to delete, you WILL NOT be able to click on any item (which you're saying there shouldn't be) that actually to refer to the template. You'll have to use the DBBrowser to delete those items as well. Be careful

1
votes

Also, you could use the Template Usage Reporter sitecore module to determine which items sitecore thinks the current template is being used by. Additionally - an alternative here is to use sitecore rocks to delete the template - it gives you additional user friendly options. I would run the Broken Links Report after this though - just to make sure things worked out fine.

0
votes

Delete your standard value of the template :=)