Microsoft Knowledge Base Email Alertz

MOSS 2007 : Field associated with content types don't retain when switching content type between read-only and read-write mode

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: 971195 - Last Review: May 11, 2009 - Revision: 1.0

MOSS 2007 : Field associated with content types don't retain when switching content type between read-only and read-write mode

Source: Microsoft Support

RAPID PUBLISHING

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

Symptom



A custom content type associated with a list does not retain their field associations when the content type is switched to read-only and then switched back to read-write mode.

Cause



The attribute name specified in the ContentType.xml file is wrong.  Attribute name "Name" has been changed to "DisplayName" and is the cause of the issue. Both working and non-working sample given below :

 

This is the correct ContentType.xml file:

 

<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint">

  <ContentType

      ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900213FEEC23C37400bBEC425C10E76F37F"

      Name="Alternate Approach Content Type"

      ReadOnly="FALSE"

      Sealed="FALSE"     

      Group="WROXNEW"

      Hidden="FALSE"

      FeatureId="6B0480D2-009A-49c1-9DCB-EBF5F7358873">

   

    <FieldRefs>

      <FieldRef ID="{C3AA9C21-81F7-41d7-B5A5-CBEB40768C46}"

                Name="AlternateApproachColumn" />

    </FieldRefs>   

  </ContentType>

  <ContentType ID="0x010400F5E5CFB41AB14ef9A10791C691805FD9"                                                                                                      

        Name="My Classified Ads"

        ReadOnly="FALSE"

        Sealed="FALSE"

        Group="WROXNEW"

        Description="This is the Classified Ads Content Type"

        Hidden="FALSE">

    <FieldRefs>

      <FieldRef ID="{3EAB136B-CC2B-4370-A163-0F1F824E8BEF}" Name="ContentBodyForListItem"  Required="TRUE"/>

      <FieldRef ID="{04E07776-F7D9-4638-B850-BB79C4172C5E}" Name="Image1"/>

      <FieldRef ID="{1F507BE5-42B1-4218-9D9B-CBD12CACD995}" Name="AdContactDetails" Required="TRUE"/>

      <FieldRef ID="{A34EA376-BF95-4f42-98B5-327649787467}" Name="Flag" Hidden="TRUE"/>

    </FieldRefs>

  </ContentType>

</Elements>

 

The incorrect ContentType.xml file:

 

<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint">

  <ContentType

      ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900213FEEC23C37400bBEC425C10E76F37F"

      Name="Alternate Approach Content Type"

      ReadOnly="FALSE"

      Sealed="FALSE"     

      Group="WROXNEW"

      Hidden="FALSE"

      FeatureId="6B0480D2-009A-49c1-9DCB-EBF5F7358873">

   

    <FieldRefs>

      <FieldRef ID="{C3AA9C21-81F7-41d7-B5A5-CBEB40768C46}"

                Name="AlternateApproachColumn" />

    </FieldRefs>   

  </ContentType>

  <ContentType ID="0x010400F5E5CFB41AB14ef9A10791C691805FD9"                                                                                                      

        Name="My Classified Ads"

        ReadOnly="FALSE"

        Sealed="FALSE"

        Group="WROXNEW"

        Description="This is the Classified Ads Content Type"

        Hidden="FALSE">

    <FieldRefs>

      <FieldRef ID="{3EAB136B-CC2B-4370-A163-0F1F824E8BEF}" DisplayName="ContentBodyForListItem"  Required="TRUE"/>

      <FieldRef ID="{04E07776-F7D9-4638-B850-BB79C4172C5E}" DisplayName="Image1"/>

      <FieldRef ID="{1F507BE5-42B1-4218-9D9B-CBD12CACD995}" DisplayName="AdContactDetails" Required="TRUE"/>

      <FieldRef ID="{A34EA376-BF95-4f42-98B5-327649787467}" DisplayName="Flag" Hidden="TRUE"/>

    </FieldRefs>

  </ContentType>

</Elements>

Resolution



Corrected ContentType.xml feature element file.

 

<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint">

  <ContentType

      ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900213FEEC23C37400bBEC425C10E76F37F"

      Name="Alternate Approach Content Type"

      ReadOnly="FALSE"

      Sealed="FALSE"     

      Group="WROXNEW"

      Hidden="FALSE"

      FeatureId="6B0480D2-009A-49c1-9DCB-EBF5F7358873">

   

    <FieldRefs>

      <FieldRef ID="{C3AA9C21-81F7-41d7-B5A5-CBEB40768C46}"

                Name="AlternateApproachColumn" />

    </FieldRefs>   

  </ContentType>

  <ContentType ID="0x010400F5E5CFB41AB14ef9A10791C691805FD9"                                                                                                      

        Name="My Classified Ads"

        ReadOnly="FALSE"

        Sealed="FALSE"

        Group="WROXNEW"

        Description="This is the Classified Ads Content Type"

        Hidden="FALSE">

    <FieldRefs>

      <FieldRef ID="{3EAB136B-CC2B-4370-A163-0F1F824E8BEF}" Name="ContentBodyForListItem"  Required="TRUE"/>

      <FieldRef ID="{04E07776-F7D9-4638-B850-BB79C4172C5E}" Name="Image1"/>

      <FieldRef ID="{1F507BE5-42B1-4218-9D9B-CBD12CACD995}" Name="AdContactDetails" Required="TRUE"/>

      <FieldRef ID="{A34EA376-BF95-4f42-98B5-327649787467}" Name="Flag" Hidden="TRUE"/>

    </FieldRefs>

  </ContentType>

DISCLAIMER

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.

APPLIES TO
  • Microsoft Office SharePoint Server 2007
  • Microsoft Windows SharePoint Services 3.0
Keywords: 
kbrapidpub kbnomt KB971195
       

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