I was trying to delete a master page in SharePoint designer, and I got the error “This item cannot be deleted because it is still referenced by other pages”. This was strange, as we knew that the master page had been reset for all sites in the site collection. We simply couldn’t find a reference.
Well, it turns out that this is a bug, and that Katrien De Graeve has an answer – create a folder, move the master page into the folder, delete the folder. Bizarre, but it works. And I have no idea how the heck they figured that out…
16 thoughts on “Error "This item cannot be deleted because it is still referenced by other pages"”
When i go to move the file it still says “This item cannot be deleted because it is still referenced by other pages” 😦
Hmm. I don’t know then… I’d check that a) it really isn’t referenced by other pages, and b) it’s checked in. If both those are true, I’m afraid I don’t have any other ideas – though if you do get it sorted, let me know how!
Oh, and you can use the site content and structure pages to find out what files reference a page, though sometimes it will report slightly spurious results – such as master pages, or CSS files.
Brilliant – just what needed 🙂
Thanks for posting this. I was having a hard time figuring this one out, but your solution worked! 🙂
Excellent – thanks ever so much for posting!
Thanks, I moved all the unwanted MasterPages to a folder and then successfully deleted it.
Nice one! It works great
Haha, it worked!
The proposed solution is actually a workaround. What probably is going on is versioning settings on the masterpage library prohibiting you from deleting the file. So the reference sharepoint is talking about, could be the older versions of the file you are trying to delete. Disabling the Versioning settings on the masterpage library, hence deleting all but the current versions of the file, gives you the opportunity to delete the master template file……
Just dragging the master file into a subfolder could break up versioning for the library.I did not test this though…..
Hmm. I wasn’t aware that something *could* reference an older version of a file in SharePoint. I know that was possible in some other systems (“Generations” in Open Text Livelink, for example). I’ve not seen any URLs that specify a version, either.
After SP1 I’ve never had this problem again; maybe it’s been fixed.
Either way, there is something screwy – I should be able to delete, or not; folders shouldn’t come into it!
Thank you very much Andy! It works perfectly, we have spent quite an hour trying to deleted the .master file!
Worked great for me…. thank you so very much.
What a freakish workaround and it’s awesome that Katrien found it. Thanks for sharing this because it works perfectly. 🙂
lol works like a charm.
I tried the Microsoft way
before I realized that they were just trying to make you hide the things.
I think there may be an easier solution. I had several master pages I was testing with. I could not delete them because of the bug in MOSS 2007. So, I renamed the master page from “abc.master” to “abc.mastex”. When I did this I received a message that the page will be unusable. I clicked ok and the master was renamed. Then I deleted it without any problems!
Was battling this for a few days. My initial fix was to just rename the file and drop in the updated. Ended up moving to a folder and deleting the folder with success!
Thanks for the info!