About SPLimitedWebPartManager

Usually we add/update/delete web parts in the publishing page in MOSS 2007 by SPLimitedWebPartManager in object module. Most of the time, we got the test/demo small console program, then we implemented into QA/Staging/Production environment and got the expected result. But sometime not, and will confused us for a long time…

Recently, I am trying to add web part by object model, I choice the way to create web part instance and add the web part into PublishingPage by SPLimitedWebPartManager. The reason is the web part adding execute dll (thread) will called by the web part. So the only way to create new web part instance is by Reflection.

But I always got error message told me the page don’t check out? why? I run Page.Checkout() several time, and the web part adding was not work still. The error message is
The file is not checked out, You must first check out this document before making changes. at Microsoft.SharePoint.Library.SPRequestInternalClass.AddWebPart

After two weeks,  finally I got the hint in this discussion thread. Yes, the point is
PLEASE INITIAL SPLimitedWebPartManager AFTER Page Checkout.


SharePoint June Cumulative Update Packages

Here is the announcement of Microsoft SharePoint Team Blog.

Build Number is 12.0.6510.5003.

Following are my note on this CU:

  1. The MSP_WEB_SP_QRY_ReadStatusApprovalHistory stored procedure takes a long time in some cases. – > Does this one meaning It will take a long time to process when we try to get the approval history?
    Beside this one is belong to MOSS 2007, others are for SharePoint Service 3.0.
  2. When a list is broken in your site, you cannot start a crawl successfully, and you receive the following error message in the crawler log:
    Crawling fails with "List does not exist" error Indexing and crawling failed with the following error: Crawling failed with an error for this URL: Error 0x81020026 The SharePoint list pointed to by this URL does not exist. Verify that it can be accessed using an internet browser. (List does not exist The page you selected contains a list that does not exist. It may have been deleted by another user.)
    However, you cannot delete the broken list by using the stsadm -o forcedeletelist -url http://servername:port/sites/sitename/listname command.
  3. SPList.GetItems(SPQuery) fails when the item count reaches the threshold value 2000, and you will receive the following error message:
    Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
  4. You configure a SharePoint server to accept incoming E-mail messages. You notice that incoming E-mail messages are processed based on their alphabetical order in the Drop folder. However, you want the incoming E-mail messages to be processed according to their order of creation in the Drop folder.
  5. Search query summary results are not rendered correctly when they contain Hexadecimal escaped characters. For example, a hexadecimal escaped character is displayed as "á".
  6. You have a SharePoint document library with the Major and Minor Version History option enabled. You also set the Only users who can edit items should see draft items option to "Who should see draft items in this document library?". If you use the "Get document" RPC method to download the drafts programmatically, it does not return the Draft Version.
    As a site administrator, when you use "Managed checked out files" to take ownership of documents checked out by other users in a Document Library that has 9 or more datetime columns, you receive the following message:
    Some of the files cannot be checked out by you. They have been deleted or checked in by other users.
    If you select more than one file to assume ownership, you notice that the operation succeeds only for the first file.
  7. You create immediate alerts and scheduled alerts on document libraries at the library level. You receive an initial E-mail indicates that a message alert is created. However, you cannot receive alerts for all the documents. This issue occurs in Contributor and Reader when major and minor versioning is enabled on the document library.
  8. You install the Hotfix package described in KB 968850. However, when you click Site Action in a SharePoint site, the menu in the Site Action is expanded to the same width as the Web page.
  9. You can display pictures from E-mail messages in an E-mail enabled "Discussion board". However, if users reply to your E-mail and insert pictures, the pictures from the replied E-mail message are displayed as "X" in the Discussion Board.
  10. Incremental content deployment from a source Microsoft Office SharePoint Sever (MOSS) 2007 farm to a target MOSS 2007 farm fails intermittently with SQL deadlock errors.
  11. In SharePoint document libraries that have versioning enabled, if you upload a new document and enter text in the Version Comments text box, the text you entered in the Version Comments text box will be lost, and will not be visible when you view the version history of the document.
    In the issue tracking list, you can open and save an attachment successfully for the first time, but when you try to save the attachment again, you receive the following error message:
    The Internet Address <URL> is not valid.
    About this one, the good thing is I never suggested user to use this list template.
  12. You use multi-value lookup values in a SharePoint list. However, you notice that some documents in the SharePoint list are unpublished. The multiple value lookup values in the AllUserDataJunctions table are still present and flagged as current version documents and are not marked to be deleted. Therefore, multiple value lookup values become orphans. In this case, if you use the stsadm -o export command, the export phase of the content deployment will fail.
  13. When you edit a detached page in the pages library and then click Modify Shared Web Part, you are redirected to a "This page has been modified since you opened it" page.
    I think this error message was familiar for any SharePoint admin. m….maybe I have to check does this error message will popup again when I modified the navigation.
  14. You experience poor performance when you use the stsadm -o export command to export large sites.
    If possible, maybe some benchmark will help SharePoint admin more.
  15. If you rename a .doc file in the Document Library, the custom non-text properties of the .doc file change to a text type and lose their values. The custom properties are only created in the .doc file and there are no custom columns for the properties in the Document Library.
  16. When a SharePoint user creates a circular loop between lookup columns, if you click one of the lists that contain lookup columns, this action will cause 100% CPU usage on the SharePoint server. To work around this issue, you have to perform an application pool recycle.
    Ah…Ever loop, maybe add a condition check and popup a warning will be more help…whatever SharePoint was for the common user, right?
  17. When you restore a host header site collection from a backup to a new host header site collection, the host header value in the restored site collection is still the host header of the old site. After you restore the site collection, if you detach and reattach the content database of the restored site collection, the restored site collection is no longer available and will be left orphan.
  18. You use the Group By option in the People and Groups list, and then you set the group to "Collapsed by default". However, when you try to expand the group, it cannot be expanded.
  19. You move a sub-site to a new location, and then you delete its earlier parent site. In this case, the incremental deployment job fails, and your receive the following error message:
    Error deleting Web site "/ParentSite/SubSite". You can't delete a site that has subsites.
    You use a computer that is running Windows Vista in a domain that has an "&" in its NetBIOS domain name. When you try to use this computer to checkin a document into a SharePoint document, you receive the following error message:
    This document was checked out to your local drafts folder but the local copy could not be checked in to the site. Close any application that is editing the document and try to check in again, or discard the checkout.
  20. When you try to upload a .mht file generated by a third-party application to a SharePoint document library, you receive the following error message:
    No "boundary" in CGI environment.
    Troubleshoot issues with Windows SharePoint Services.
  21. Workflows do not recognize users from the Membership Provider in the SharePoint Designer when Forms-based Authentication (FBA) is enabled.
  22. You have a SharePoint list that has more than 500 items. The list has a column of "People and Groups" type with the "Allow multiple selections" setting set to "Yes". If you click Show Filter Choices in this list, you receive the following error message:
  23. In an extranet deployment scenario in SharePoint, the URLs to access SharePoint internally and the URLs to access SharePoint externally are different. You access the SharePoint externally, you visit a page that contains a list view Web part, you edit the list view Web part, and then you click the Edit current view link. However, when you click Cancel to go back to the previous page, you receive a "file not found" error message. Additionally, when you examine the URL in the Internet Explorer address bar, it displays an internal URL.
  24. When you are using reusable content and perform a content deployment, only one version of the reusable content is preserved on the target site. It will always be the latest version on the source site regardless of whether the latest version is approved or not.