Reply to comment


When I try to update my content type (following this guide almost exactly) I get "A content type which does not belong to a collection cannot be updated" as a fatal error. This is thrown on SPContentType.Update(bool, bool) and through reflector I'm pretty sure this code block is throwing it: if ((this.Collection != null) && (this.Collection[this.Id] == null)){ throw new SPException(SPResource.GetString("CannotUpdateContentType", new object[0]));} the second condition of the if is the confusing/important part -- why would the SPContentTypeCollection of the web not being updated to include my new ContentType? I'm declaring the content type like this: SPContentType OSUMC_Item = new SPContentType(web.AvailableContentTypes["Item"], web.ContentTypes, "MyCType");

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.