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
Microsoft Office Communications Server 2007 R2 – Part II
  Once you have set up Office Communication Server 2007 R2 to provide IM within the rganisation, the... Read more...

Mission Critical: Database Design
 There is nothing like a checklist to make sure you've completed all the tasks in designing a database,... Read more...

SQL Server Intellisense VS. Red Gate SQL Prompt
 Fabiano Amorim is hooked on today's Integrated Development Environments with built-in Intellisense, so... Read more...

Doug Crockford: Geek of the Week
  Doug Crockford is the man behind JavaScript Object Notation (JSON). He is a well-known critic of XML... Read more...

Raw Materials: Mirror, Mirror, on the Desk
 Seeing ourselves as we see ourselves. Read more...