Dealing with Master Pages in MOSS

Posted Monday, July 23, 2007 5:02 PM by C-Dog's .NET Tip of the Day

I have basically followed the instructions straight from the SDK on the proper way to install a Master Page for global use in a site collection. However, I have found that there can be some issues when you do this when you start pushing out updates to your master page. The main reason is because it seems that once you instal a master page via feature, the chances of the system going and letting you delete it are slim. If it can't delete the master page, it will not be able to install anything in that feature or solution. Typically, the error you get is the following.

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

So naturally you start looking for pages that reference it. In fact though, just by installing the feature, you will probably get this error message. I ended up finding a hack (MS suggests hiding the master page, but that obviously is not a good work around). The solution is to copy the MasterPage into a new folder using SharePoint designer and then delete that folder. This will allow you to install a new feature with your changes to your master page.

Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=376

Filed under: