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

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…

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

16 thoughts on “Error "This item cannot be deleted because it is still referenced by other pages"

  1. MrEs says:

    When i go to move the file it still says “This item cannot be deleted because it is still referenced by other pages” 😦

  2. 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.

  3. Kevin says:

    Thanks for posting this. I was having a hard time figuring this one out, but your solution worked! πŸ™‚

  4. harry says:

    Thanks, I moved all the unwanted MasterPages to a folder and then successfully deleted it.

  5. Marco says:

    Hey there,

    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…..

    Greetz Marco

  6. 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!

  7. Flavia says:

    Thank you very much Andy! It works perfectly, we have spent quite an hour trying to deleted the .master file!

    πŸ™‚ thanks!

  8. Amy Grossman says:

    What a freakish workaround and it’s awesome that Katrien found it. Thanks for sharing this because it works perfectly. πŸ™‚

    Amy

  9. Jeff says:

    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!

  10. Bryan says:

    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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.