Saturday, October 8, 2011

Sharepoint - Troubleshooting a page with "?contents=1"

Guys, I found out something which is really cool. I was working on a custom web part. I added that web part on a page "Test.aspx". One of the web part was having an error "Object Reference...". There was no SharePoint Designer installed in my machine and now i was confused, how can i remove that web part so that at least the page show up? I found out that from a friend that if we just use "?contents=1" in the querystring we can get the list of web parts and can remove the web part directly.


This "?contents=1" also show the web parts which were added to page in past. Go through the below given images to have an idea what i am trying to explain.


  • Here you can see a page with 4 web parts added to it.
    1. Quick Clicks - This is my custom webpart. This webpart contains an error which blocks the whole page to load.
    2. Image Viewer - OOTB web part.
    3. XML Viewer - OOTB web part.
    4. Content Query - OOTB web part.
  • When I clicked "Save & Close" from the top ribbon. The page bombs out giving the error mentioned below.
  • Now as i mentioned above i used "?contents=1" and it showed me the list of all the web parts for this page.
  • In the above image "Custom Web Part" was added to the page but was deleted, still it shows up in the history.
Please let me know if there are any queries.

1 comment:

  1. Keep up the good work I get valuable information from your site.

    ReplyDelete