After wrapping up a project that used content types extensively, I decided to write a series of posts detailing the headaches encountered so far.
This is part 2.
List Column Settings and STP Template Files
When you create a site content type, add that content type to a list, and then wrap that site up as an STP site template, none of your list content type column settings are carried over to sites based on the template. This means that if you’ve overridden the Hidden, Required, or Optional settings on the columns in your list content type from the base settings in the site content type, when a new site is provisioned from the site template, all the column overrides will be lost.
It appears that when the STP is packaged up, it only contains pointers to the parent content types, and ignores any list-level overrides to the content types.
Figure 1: List Content Type before STP (Notice the TestNonHiddenColumn is overridden here to be Hidden)
Figure 2: List Content Type after provisioning with STP (Notice the TestNonHiddenColumn is set back to Optional, like it is in the base content type)
Note that this is the same behavior experienced with creating List and Document Library templates as well, which must use a similar approach to templating that STP files use for site templates.