I fear that this is indeed a bug, but I'm asking just to be sure (SP1 and the CU haven't provided any change to the issue).

I have a document library that utilize multiple document set content type (they don't need to be related each other). Each of the set content type allow only for a specified child item content type. The allowed content types are different for each document set type. To be clearer:

  • Document set conten-type "Set-A" allows only items of content type "Item-A",
  • Document set conten-type "Set-B" allows only items of content type "Item-B"

and so on.

Problem is that if you add all the set content type to the same document library the allowed content types don't see to be enforced. User can create a document set of type "Set-A", upload a document and select the content type "Item-B" from the content type dropdown. Basically it would seem that SharePoint pick a random (my observation suggest the first found) child content type to be the default one for all the document set... so you would end (for example) with Set-A allowing only item of type Item-A and Set-B allowing both item of type Item-A and Item-B.

No code is needed to replicate the issue. All step can be completed from the SharePoint UI. I'm even able to reproduce the issue on a vanilla web site... just create two document set content type, add the Form CT as the only allowed CT on the first one and the Picture one on the other and add them to a document library -all (but one) of the document set get "bugged" and user can add item with an un-allowed content type to the them. I have also tried to reproduce the issue on multiple SharePoint 2010 VM hoping that something went wrong with my installation but to no avail - the behavior is exactly the same each time...

I'm missing something obvious or this is indeed a bug/unwanted behavior? Anyone has experienced this problem and find a solution?

  • We are dealing with the same issue here... did you find a solution yet?
    – user5829
    Nov 29, 2011 at 8:40
  • Three years later, it's still a bug - I'm seeing it in Office 365. May 7, 2014 at 19:18

1 Answer 1


SharePoint 2010 takes the document library's default Content Type (which by default is the first CT) as the CT of the document being uploaded in the Document Set, even when it's not an allowed CT of that Document Set. (which indeed seems to be a bug)

The "New Document" ribbon item does however show the right Content Types that are allowed in the Document Set (as intended).

One possible solution is to check the content type on the document added in the ItemAdded event and change it, or return an error.

  • Ayae, that's what I have done in the end - I have forced the first valid content type if the user select one of the wrong types.
    – SPArcheon
    Nov 29, 2011 at 13:46
  • Done some more test - got it clearer now. The upload control uploads the file before showing the item/file property page, so it's only "logical" that it will first upload the file with a default content type, expecting the user to change it soon after. Problem is, Microsoft seem to have forgot the impact of this behaviour on a documens set. Strange enough, it seem that if the default ct for a list is a document set type, the content type for an uploaded document will be the the first allowed ct for the set type - which would make you think that there is some management code hidden somewhere
    – SPArcheon
    Nov 29, 2011 at 14:19
  • Which still isn't exactly what you want if you don't allow the CT to be added to the doc lib without being inside the document set. But it can be a solution in some cases.
    – Bart
    Nov 29, 2011 at 16:29
  • Precisely my point - I fear that the only solution is nuking the upload form and go for a custom development. The moment you assume that different places (inside and outside a set) in a list can allow for different content types the OOTB upload won't just work as-is - you are simply bound to find a place where you can upload a document and force a content type that shouldn't be allowed. Back to the drawing board again... at last it should be easy to reimplement the upload form, at last the single file one - then maybe I can override the ribbon button custom action.
    – SPArcheon
    Nov 29, 2011 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.