Sharepoint 2007 – Updating Child Content Types problem


There are still a lot of implementations of Sharepoint 2007, and I still work with some. This week we came across a problem updating content types across a site collection using the User Interface and I didn’t find any reference to this problem or solutions. So because I had to figure it out on my one, here it is my contribution on this issue. It is a long post, but I am trying to detail as much as I can.

  • Problem:

Actually we had two different problems that resulted in the same behavior, we had to add 4 new site columns to a Site Collection Content Type, that is the Parent of a 120 Child Content Types, most of them direct Parent, some of them is the indirect Parent [Content Type A -> Content Type AA (inherits from A)-> Content Type AAA(inherits from AA)]. And to help the scenario we have these Content Types are applied in document libraries in 450 sites and sub-sites.

Problem 1: We added 4 new site columns to the Base Content Type (Content Type A) and set the update option to true, this option would update all Content Types that inherit from the Content Type A.

Problem 2: We changed the order of the columns in the Content Type A and set the update to true, this option would update all Content Types that inherit from the Content Type A.

  • Behavior:

Problem 1:
When we applied the changes to the dependent Content Types, after a long time, we had the page were we were executing the process, returned a Time Out error.
The result was that we had some document libraries Content Types updated and some not updated. apparently the process was terminated and the update didn’t finish. After a few hours we checked and there was more updates done, but didn’t finish all the updates. No more updates were observed.
During this update process the server started consuming a lot of RAM, sometimes getting to use up to 90% of the available RAM. You can check this using the Task Manager or in the IIS Manager the Worker Processes and looking to the Sites Application Pool process.
The final result was that we had only some Document Libraries Content Types updated, leaving the others to be updated.
Problem 2: The behavior was the same has described in the Problem 1 behavior.
  • Solution:
At least my solution 🙂
Problem 1:
To force an update in a Content Type we need to change something, otherwise Sharepoint won’t start any update.
We started by trying to update only 1 Site Column, the trick was to remove the 1 site columns from the Content Type A without updating the child Content Types. After this we add the 1 Site Columns again this time setting the update option to true.

This time the process didn’t failed and all Child Content Types were updated with the new field. To the Child Content Types that already had the new field no change was done, and to the ones that didn’t had the new field was added.
Feeling confident we then tried with the remaining 3 Site Columns, again the trick was to remove the 3 site columns from the Content Type A without updating the child Content Types. After this we added the 3 Site Columns again this time setting the update option to true.
This time the process didn’t failed either and all Child Content Types were updated with the new fields. To the Child Content Types that already had the new fields no change was done, and to the ones that didn’t had the new fields were added. In this 3 Site Columns update process was done in 2 separate times, when we checked the update times we had one major update 14 hours before and another 8 hours before.
Problem 2:
So now we had all new Site Columns in the Content Types and we needed to change their order, remember that this update order process had been done and like the Site Columns update had stopped with a Time Out error and only updated some.
To force an update of the order of a Content Type we need to change something, otherwise Sharepoint won’t start any update.
We started by trying to update the order again, the trick was to change the order in the Content Type A without updating the child Content Types. After this we reorder to the desired order again this time setting the update option to true.

The update process failed again and we had to check which Child Content Types were updated with the new order. What we found was that some of the updates that previously failed were now done, but not all.
So, what can we do???? run it again 🙂
So always apply the complete changes you want to do, in this case I changed the order of new all fields, without updating the Child Content Types, and then reorder them all to the desired place before updating the Child Content Types. Done, updated them again and  . . .
This time we didn’t get the Time Out error, the process ended and all Child Content Types were updated with the correct order.
This solution to update the order is not a pretty one, but im my case it worked and did the trick. You can do these  updates using code, or running the STSADM extensions, just remember that if you already have information in Site Columns in a List or Library you cannot simply remove that columns and added again, that was my case, and that is why we choose to run the User Interface process. It works, but sometimes it needs a little push 🙂
Hope this helps someone!

Computer developer/consultant from Portugal. You can find me at ricardo.magalhaes@gmail.com

Posted in Sharepoint, Sharepoint

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: