A Note on Content Type Inheritance
Posted
Tuesday, November 4, 2008 11:15 AM
by
CoreyRoth
I ran into this issue a while back so I thought I would post on it. I had a scenario where we wanted to create a simple content type to use as a base content type for all future content types at a comapany (i.e.: Company Base Document). At the time we did not know what site columns we wanted included, so we didn't include any FieldRefs to site columns. We just inherited from this type into another more project specific document type. It seemed like a good idea at the time, but it of course caused a number of problems.
It appears that if you do not specify any FieldRef elements in your content type definition that any other fields further up in the inheritance tree will also not get inherited. This caused things like the Title field (inherited from item) to not be included in our content type. The lesson to be learned here is a) plan better and have your fields defined first and b) make sure that you always specify at least one FieldRef in your content type definition. I am sure there is a technical reason for this, but I thought I would throw it out there in case someone else runs into the issue in the future.
Also if you haven't checked out my latest addon for Enterprise Search, go check it out. I am pretty excited about it and the users I have shown it to so far have found a lot of value in it.