Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / productivity / SharePoint

Handling problem-child webparts

5.00/5 (2 votes)
21 Jun 2010CPOL2 min read 6.9K  
Solving problems editing a SharePoint web page when webparts on the page are not registered as safe.

If you work with SharePoint designer, chances are that you have encountered this problem. The developer clicks a page in the Folder List, and this message is displayed:

The server could not complete your request...
Although no webparts appear to be on the page, problem-child webparts are associated with it, and removing them will solve the problem. In our case, we are going to assume that the problem page is the site’s default page, which in our case (again) is default.aspx. If the page you are having trouble with is already in a document library, you can skip step 1.

1. In SharePoint Designer, copy default.aspx and paste it in a document library, using caution not to overwrite any existing default.aspx files that may incidentally be in the library. We will use Shared Documents for our example.
2. Using your web browser, navigate to the site’s Shared Documents library, hover over default.aspx, click the down arrow, and select Edit Properties.
3. The Edit Form is displayed, which contains the link “Open Web Part Page in Maintenance View”. Click the link.
4. A list of web parts is displayed. Those with errors or problems will be indicated as such. Select the items that indicate an error (as well as any other web parts you’d like to remove) and click the Delete button.
5. Click the link “go back to web part page”.
6. In SharePoint Designer’s Folder List, expand the Shared Documents library node, and double click default.aspx. The page will now open in designer.
7. Edit as required and save your work.
8. In the folder list, rename the file from Default.aspx to Default_2.aspx.
9. Cut and paste Default_2.aspx back into the root directory.
10. Right click on Default_2.aspx and select “Set as home page”.
11. SharePoint Designer renames the file Default.aspx, and renames the former Default.aspx to default-old.aspx (or default-old1.aspx if default-old.aspx already exists).

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)