Monday, September 22, 2008

"This item cannot be deleted because it is still referenced by other pages."

So this is one I ran into a while back, and it really annoys me that the top Google link when searching for the error "This item cannot be deleted because it is still referenced by other pages." is the MSDN page telling you to make it "hidden"... This error shows up when trying to delete a Master Page from the Master Page Gallery. Sometimes it will delete just fine, and sometimes you will be presented with this error, even though there are no other pages still referencing it.

The solution is:
  1. Open the site in SharePoint Designer
  2. Navigate to the master page gallery (it is called 'masterpage' under the '_catalogs' folder)
  3. Create a new folder,
  4. Move the Master Page you are trying to delete into this new folder
  5. Then delete the folder
  6. And there you go, SharePoint is now magically ok with deleting the Master Page afterall!

No comments: