Friday, October 3, 2008

Manually Getting to the “Web Parts Maintenance Page”


Certainly every SharePoint developer has dropped a custom web part onto a page that killed the whole page.  Sometimes SharePoint will prompt you with a link to reach the Web Parts Maintenance Page, sometimes it won’t.  On some occasions (when I’ve really broken something) SharePoint will provide me a hyperlink to the maintenance page, but clicking the link simply throws another irrecoverable error. 

Here are a few screenshots of this rather infuriating error:

1

Clicking the “Web Parts Maintenance Page” hyperlink results in something even less helpful:

2


The Fix / Workaround


So it’s helpful to be able to get to that “web parts maintenance page” for any page, at any time we want.  This might be common knowledge, but I’ll throw this little trick out there in case it can be of any help. 

For any web part page in your SharePoint environment, you can append the query string “?contents=1” after the “.aspx” link and get directly to the web parts maintenance page.  Works every time! 

For example, if your problem page is “http://localhost/sites/MyBrokenSite/default.aspx”, the URL to the maintenance page (where you can easily close or delete the problem web parts) would be “http://localhost/sites/MyBrokenSite/default.aspx?contents=1.” 

3

 

Hope that helps … enjoy!

-- Jon

No comments: