Finding all references where a master page, page layout, or other file is used in a MOSS 2007 Publishing (WCM) site

Seems to be quite a common question popping up recently... people are trying to delete their master page or page layout (or some other file) from the Master Page Gallery but keep getting an error.

Seems to be quite a common question popping up recently… people are trying to delete their master page or page layout (or some other file) from the Master Page Gallery but keep getting the following error:

SharePoint 2007 Error

SharePoint 2007 Error

Even though you think you cleaned up all the places where a file is being used, I’ve yet to see a bug in MOSS that says a file is being used yet it really isn’t. Chances are, you just missed one (or two). The easiest way to find where a file is being used is to go to the Site Content & Structure page via Site Actions » Manage Content and Structure. Then open up the Master Page Gallery. You’ll notice a option in the toolbar: Show Related Resources. Select that item to create a split view. Now each item in the Master Page Gallery (shown in the top pane) has a radio button next to it. Selecting one will show you all the places that file is being used throughout the site collection.

Here’s a screen shot of a particular page layout and where it is being used within my site collection:

SharePoint 2007 - Show All Related Resources

SharePoint 2007 - Show All Related Resources

Andrew Connell
Developer & Chief Course Artisan, Voitanos LLC. | Microsoft MVP
Written by Andrew Connell

Andrew Connell is a full stack developer who focuses on Microsoft Azure & Microsoft 365. He’s a 20+ year recipient of Microsoft’s MVP award and has helped thousands of developers through the various courses he’s authored & taught. Andrew’s mission is to help web developers become experts in the Microsoft 365 ecosystem, so they can become irreplaceable in their organization.

Share & Comment