Microsoft Office SharePoint Server 2007 - The Complete Reference by David M. Sterling

"ECM - Content Management and Site Columns" by DavidMSterling on November 10, 2007, 12:45 am, in category Comments
For those of you that have had an issue with Site Content Types and Site Columns and their use on Pages using Designer, there are some typical problems which are not readily apparent in Microsoft's documentation on Designer.

One of the most common problems is when you create a page layout then mysteriously, when you go to use the page, the fields defined on it do not appear. Another is when you go to edit a page and get an error regarding the type of field - even though it appears correctly in Designer, it fails to render in SharePoint.

The root of most is the Site Content Types and Site Columns themselves - specifically in how columns are named. While everything may appear OK in the Site Content Type and Site Columns, there is a little anomaly in how SharePoint determines what columns go with which in that SharePoint doesn't always know which column to use in a given template.

The core is the names of the columns - for example, if I have a field called Overview that appears in two different Site Content Types and both of those content types are attached to say a pages library, SharePoint will often misinterpret which Overview goes with which Site Column. You can see this by looking at the document libary settings - you will see multiple definitions for the same column. This gets even worse if a site column has the same name but a different data type. Cleaning this up can be very problematic in a Pages Library and in many cases, simply rebuilding the site is necessary. Note that Lookup fields do not have this issue.

The key to the solution is naming. If you are defining two Site Content Types that will have similar columns (such as Overview), you should ALWAYS create SEPARATE fields for each, that is Content Type 1 Overview and Content Type 2 Overview. Yes this does sound like a lot of work, but correctly naming fields to keep them distinct will prevent a bunch of problems down the road.

The key to succesfully working with Site Content Types is to remember that the Columns they use shouldn't be shared across types; Site Content Types do not make them unique, they simply provide a mapping path to the fields.