Microsoft Knowledge Base Email Alertz

You cannot edit list items on existing SharePoint sites even if you already installed build 12.0.6336.5001 of the hotfix that is described in Microsoft Knowledge Base (KB) article 961175

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 971351 - Last Review: July 29, 2009 - Revision: 1.0

You cannot edit list items on existing SharePoint sites even if you already installed build 12.0.6336.5001 of the hotfix that is described in Microsoft Knowledge Base (KB) article 961175

SYMPTOMS

Consider the following scenario:
  • You create a Windows SharePoint Services 3.0 site collection.
  • You export the site collection.
  • You import the site collection into a new site collection.
  • You create a new customized list in the new site collection.
  • You add a new list item and then try to edit the newly-added list item.
In this scenario, you cannot edit the newly-added list item.

This problem was previously fixed in a hotfix package that is described in Microsoft Knowledge Base (KB) article 961175. After you install build 12.0.6336.5001 of the hotfix that is described in KB 961175, newly created SharePoint sites do not experience this problem as expected. However, existing SharePoint sites that already experienced this problem before you install the hotfix that is described in KB 961175 still have this problem. In this case, you have to run an object model code to work around this problem on existing sites.

WORKAROUND

To work around this problem in the list fields on existing sites, run the following object model code:
void FixField()
        {
            string RenderXMLPattenAttribute = "RenderXMLUsingPattern"
            string weburl = "http://localhost"
            string listName = "test2"
 
            SPSite site = new SPSite(weburl);
            SPWeb web = site.OpenWeb();
            SPList list = web.Lists[listName];
            SPField f = list.Fields.GetFieldByInternalName("PermMask");
            string s = f.SchemaXml;
            Console.WriteLine("schemaXml before: " + s);
            XmlDocument xd = new XmlDocument();
            xd.LoadXml(s);
            XmlElement xe = xd.DocumentElement;
            if (xe.Attributes[RenderXMLPattenAttribute] == null)
            {
                XmlAttribute attr = xd.CreateAttribute(RenderXMLPattenAttribute);
                attr.Value = "TRUE"
                xe.Attributes.Append(attr);
            }
            string strXml = xe.OuterXml;
            Console.WriteLine("schemaXml after: " + strXml);
            f.SchemaXml = strXml;
        }
To work around this problem in the Web fields on existing sites, run the following object model code:
void FixWebField()
        {
            string RenderXMLPattenAttribute = "RenderXMLUsingPattern"
            string weburl = "http://localhost"
 
            SPSite site = new SPSite(weburl);
            SPWeb web = site.OpenWeb();
            SPField f = web.Fields.GetFieldByInternalName("PermMask");
            string s = f.SchemaXml;
            Console.WriteLine("schemaXml before: " + s);
            XmlDocument xd = new XmlDocument();
            xd.LoadXml(s);
            XmlElement xe = xd.DocumentElement;
            if (xe.Attributes[RenderXMLPattenAttribute] == null)
            {
                XmlAttribute attr = xd.CreateAttribute(RenderXMLPattenAttribute);
                attr.Value = "TRUE"
                xe.Attributes.Append(attr);
            }
            string strXml = xe.OuterXml;
            Console.WriteLine("schemaXml after: " + strXml);
            f.SchemaXml = strXml;
        }
To work around this problem in the list template (.stp) on existing sites, follow these steps:
  1. Rename the .stp file to a .cab file.
  2. Open the Manifest.xml file that is included in the .cab file.
  3. Change the contents of the Manifest.xml file to the following:
    <Field ID="{BA3C27EE-4791-4867-8821-FF99000BAC98}" 
            Name="PermMask" 
            SourceID="http://schemas.microsoft.com/sharepoint/v3" 
            StaticName="PermMask" 
           RenderXMLUsingPattern="TRUE" 
            Group="_Hidden" 
            ReadOnly="TRUE" 
            Hidden="TRUE" 
            ShowInFileDlg="FALSE" 
            Type="Computed" 
            DisplayName="$Resources:core,Effective_Perm_Mask;"> 
            <FieldRefs> 
                <FieldRef ID="{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}" Name="ID"/> 
            </FieldRefs> 
            <DisplayPattern> 
                <CurrentRights/> 
            </DisplayPattern> 
        </Field> 
    
  4. Repackage the updated Manifest.xml file into the .cab file.
  5. Rename the .cab file back to the .stp file.
  6. Upload the new list template (.stp) to the template gallery.

    Note The lists that are created from this new list template should work as expected.

REFERENCES

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
961175  (http://kbalertz.com/Feedback.aspx?kbNumber=961175/ ) Description of the Windows SharePoint Services 3.0 hotfix package (Sts.msp): December 19, 2008

APPLIES TO
  • Microsoft Office SharePoint Server 2007
Keywords: 
kbtshoot kbexpertiseinter kbsurveynew KB971351
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate