Removing closed web parts before saving a project workspace template
By blurg64
Recently I have seen this problem manifest itself at two customers, so I thought I would post about it to save anyone else running into it, or scratching their heads. When you customise project workspaces, or SharePoint workspaces in general, you have two options to remove the web parts from the page:
- Close the web part – this stops the web part being rendered on the page, but still being created on each page load
- Delete the web part – this removes the web part from the page completely.
By default, when you click on a web part without putting the page into edit mode, the first option presented to the user is to close the web part, but not to delete.
It is only after you choose to edit the page that you will get an option to delete the web part, either in the context menu,
or via the Web Part Tools ribbon.
So what is the problem you may be asking? Well, in both cases, to customise the templates the users had simply closed instead of deleting the web parts and then thinking all was good, saved the workspace as a template. When that template was used to create a new site, each of the closed web parts were restored and visible once again, effectively removing the customisations.
Luckily fixing this is pretty simple.
First, we need to gain access to the Web Part Maintenance page which will display all web parts on the page and their associated status. To get there, simply add the following to the URL – ?Contents=1 so…
http://project.contoso.com/PWA/ProjectSiteTemplate/default.aspx
becomes
http://project.contoso.com/PWA/ProjectSiteTemplate/default.aspx?Contents=1
This will display the web part maintenance page, showing each of the web parts and their associated status.
To delete the closed web parts, simply select the correct items and click on Delete. This will delete the web parts from the page.
Finally, save the site as a template once again and all new sites created with it will reflect your customisations. Of course all of this can be avoided by a simple bit of training to delete instead of close, but if the web parts have already been closed, this will help you fix it.