Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

You cannot create new posts on a blog site that uses a customized PostCategory content-type in Windows SharePoint Services 3.0


Symptoms

Assume that you use a customized PostCategory content-type in Microsoft Windows SharePoint Services 3.0. You create a new blog site that uses the customized PostCategory content-type. In this situation, you cannot create new posts on the blog site.

↑ Back to the top


Resolution

To resolve this issue, apply the following update:
2483218 Description of the Windows SharePoint Services 3.0 hotfix package (Sts-x-none.msp): February 22, 2011

↑ Back to the top


Workaround

For the existing blog site, the following code example can be used to fix this issue:
using (SPSite site = new SPSite("http://localhost/blog"))  //for the Url of the blog web
{
SPWeb web = site.OpenWeb();
Console.WriteLine(web.Title);
SPList postList = web.Lists["Posts"];
SPList categoryList = web.Lists["Categories"];
SPFieldLookup postcategoryLookup = (SPFieldLookup)postList.Fields.GetField("PostCategory");
String lookupList = categoryList.ID.ToString("B").ToUpper();
postcategoryLookup.LookupList = lookupList; //this line will throw exception if the List is already set
postcategoryLookup.LookupField = "Title";
postcategoryLookup.Update();
Console.WriteLine(postcategoryLookup.SchemaXml);
}

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kbqfe, kbexpertiseinter, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2504011
Revision : 1
Created on : 1/7/2017
Published on : 3/18/2011
Exists online : False
Views : 92