Project Server 2007: Where did my Web Part go?

We had a recent customer incident where they could not drill in to projects from Project Center – they just saw a blank section of the page where the drill down should be on the ProjectDrillDown.aspx page.  The web part was gone.  Not sure what had happened – it could have been removed from the page by use of the Web Part Page Maintenance page, which might have been displayed after an error – or it could have been removed accidentally (but not easily – as you will see later…).  Part way through the support incident they had the web part back – but all the drill downs went to the same project.  What was going on?  Read on…

Blank Page

With most cases like this, and the My Tasks page is a good example, you just add the Web Part back and all is good.  However, this page is different as it does not normally allow any layout changes – so web parts cannot be added (or removed).  If you go to Site Actions, Edit Page, there is no “Add a Web Part” option.  The first challenge here then was to get to a position where we could add a web part back again – and this involved editing the aspx page (using Notepad or your favorite text editor) – but first of course you make a backup copy!  The file can be found in C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATESiteTemplatesPWA by default, and the change is simple – at the end of the aspx page you will find the text AllowLayoutChange="false" and you need to change this to AllowLayoutChange="true".  No IISRESET needed – just save and refresh the page and you will be able to add web parts.

The next challenge was that the list of Web Parts we can add had a Project Details Web Part – and this was added – but the behavior wasn’t as expected.


Whichever project was chosen from the Project Center we saw the same project in the details page – and in fact this was the project that had to be chosen in a dropdown on the web part when it was added.  In fact this is expected behavior as the Web Part added is really intended to be used on a page to show a specific project and does not have any links to the Project Center.  If the Project Details web part is not the right one then how do we fix our page?

The way we resolved this issue was to go to a working instance of the PWA and the ProjectDrillDown.aspx page and using either Site Actions, Edit Page, or simply the unlabelled drop down in the top right of the Web Part, then choosing Export we can save this working Web Part as a .webpart file. 

To Import you need to use the link at the foot of the “Add Web Parts” page.

Link to WebPart Gallery

Then from the next page you can use the Import option (on the drop down that initially says “Browse”) where you can browse to the saved .webpart file, Upload the part and then Import to the page.

After Upload

And you have a fixed ProjectDrillDown page which drills down to the right projects!  Of course the final step is to edit the page back to AllowLayoutChange="false".

We haven’t seen this issue frequently so the loss of the web part isn’t a common scenario – but thought it worth giving details of the repair just in case others run into it. 

This isn’t intended to be a lesson in customizing pages and if any issues arise due to other customizations achieved by changing the false to true then from support we would request you replace the original page to see if the issue was related to your customizations.

Technorati Tags: