This is the first post on (hopefully) a series of posts on how to work with page layouts, masterpages and the style library – the utlimate nightmare of every deployment manager when it comes to feature-based deployment of SharePoint solutions. I will start with posting something, that Katrien de Graeve posted already on 20th of January 2007, but it is one big piece of important information when trying to manage your two most important libraries in a WCM scenario:
How do I overcome the "This item cannot be deleted because it is still referenced by other pages" problem.
I can tell you, i really killed every possible reference, even set the pagelayout/masterpage on hidden (see Microsoft's KB article), it simply doesn't work.
In order to delete PageLayouts and MasterPages this is a way that is working very well for me:
- Make sure no page is using your page layout and masterpages.
- Check also the recycle bins: _layouts/AdminRecycleBin.aspx
- Create a sub-folder in the "masterpage" library, for example "ToDelete"
- Move all page layouts and masterpages you want to delete there
- Delete the folder…
Stay tuned for more posts on topics related to PageLayouts, MasterPages and the Style Library when it comes down to a clean deployment, I'm currently working in a big project where we are obliged to have a completely clean deployment process – not so easy with these kind of obstacles to overcome. Next post to come: How to deploy webparts for all users in a page layout (remember? <alluserswebpart> [:'(])
Have a good day!