Category Archives: Content Types

SPException “The collection cannot be modified.” when calling SPContentType.Update()

If you are getting the SPException “The collection cannot be modified.” when calling SPContentType.Update() then ensure that the content type you are updating was not retrieved from the SPWeb.AvailableContentTypes collection. Content types retrieved from this collection (as oppose to SPWeb.ContentTypes) are … Continue reading

Posted in Content Types, SharePoint, SharePoint 2010 | 7 Comments

Can’t get RemoveFieldRef in your custom content type schema to work?

Check that: The Inherits attribute in <ContentType> is FALSE Check the casing of the GUID specified in <RemoveFieldRef>. My testing shows that this is case-sensitive. On the latter point above, it is best to write a harness program to check … Continue reading

Posted in Content Types, SharePoint | Leave a comment

SharePoint Evil #1: The URL ‘[url]’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web

I’m compiling a list of evil SharePoint errors: those errors that are so ambiguous and misleading that Google will shows 50 hits, with 10 different suggested solutions, and none of them work for your particular case. Here is #1: The … Continue reading

Posted in Content Types, Custom Fields, Lookup Columns, SharePoint, SharePoint Evils | 2 Comments

Content type visibility in document libraries

In a document library, once you have enabled content type management and added content types to the library, these content types are visible for the users in 3 places: on the New toolbar menu, when uploading a document when editing … Continue reading

Posted in Content Types, SharePoint | 2 Comments