Click here to monitor SSC

Charles Lee

SharePoint: Where have my content types gone?

Published Tuesday, February 02, 2010 7:00 AM

Have all your SharePoint site columns and content types ever mysteriously vanished from your site collection?  What could cause this catastrophe to occur?

At one time or another when you are developing solutions for SharePoint (MOSS 2007/WSS 3.0) you will be creating and deleting site collections regularly in order to test a piece of functionality.  It is quite possible that you have done this before so you'll know what I am talking about.

One thing that might scare you a little is if you click on Site Settings > Site Content Types and you're faced with the following:

image

By this point panic has set in and you are surely either running around the room like a headless chicken or else you have put your coat on and are heading for the nearest high street coffee emporium.

Where are my Content Types?

You will notice that the same is true of your Site Columns too!   Wait, come back. Take off that coat, you can get a coffee in a minute.

The solution is simple and could easily be solved with one simple thing.  Time.  The Site Content Type Gallery and the Site Column Gallery are both cached on the WFE and this is only updated via a timer job.  Because you have just deleted and recreated a site collection on the exact same URL as a previously existing one this timer job has not yet run to re-populate this cache.  I think this is the ConfigRefresh job, but I am not certain.

If you want to be sure then you can run the following command on your server(s) and you will see that all the site columns and content types will come straight back:

iisreset -noforce

Of course if you just wait then the timer job will run and all will be well.

This one has caught me out before, so hopefully this will help someone out and stop them running for coffee instead of doing a simple iisreset.

by CharlesLee
Filed Under: ,

Comments

No Comments
You need to sign in to comment on this blog

About CharlesLee

Charles Lee is a software solutions developer for a large law firm based in Birmingham in the UK. He has been developing with ASP.NET since 2003, and currently focuses on WSS 3.0 and MOSS 2007 solutions to complex business problems.
<February 2010>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
28123456
78910111213
How to Kill a Company in One Step or Save it in Three
 The majority of companies that suffer a major data loss subsequently go out of business. David Wesley... Read more...

Migrating from OCS 2007 R2 to Lync: Part 4
 Having migrated the rest of our users and legacy resources across, and start getting ready to... Read more...

Automated Script-generation with Powershell and SMO
 In the first of a series of articles on automating the process of building, modifying and copying SQL... Read more...

Seth Godin: Big in the IT Business
 Seth Godin has transformed our understanding of marketing in IT. He invented the concept of 'permission... Read more...

Using SQL Test Database Unit Testing with TeamCity Continuous Integration
 With database applications, the process of test and integration can be frustratingly slow because so... Read more...