Umbraco - Object reference not set..

Note: this post is over a year old, it's very likely completely outdated and should probably not be used as reference any more. You have been warned. :-)

Today, I had a little problem after adding some properties to a document type in Umbraco. I've had this problem before and I keep forgetting how to fix it.

When opening a node of this document type (in Umbraco's Content area, not the document type editor), I get the following (rather generic) error:

I must add that while creating some new properties on this document type, the property was added, but I did get and SQL time-out. Not sure why that was, but it must have interupted an update process on existing nodes.

This is probably the reason that the current nodes are now corrupt. As you can see in the exception, there was a problem adding a control to the page.

The solution is easy, you have to publish all of the nodes and its subpages to fix the error. Voliá!

Richard Soeteman adds some extra information on a similar error while deleting a property on a document type. The issues could be related, so if you still have problems, check out his blog post as well.

Sebastiaan Janssen

Dutch guy living in (and loving) Copenhagen, working at Umbraco HQ. Lifehacker, skeptic, music lover, cyclist, developer.

 

3 comments on this article

Avatar for Lee Lee | March 9 2010 07:23
We had this problem as well a few months back, another quick fix is to either touch the web.config so the application restarts/rebuilds and it will disapear (Or more long winded restart IIS)

Avatar for Sebastiaan Janssen Sebastiaan Janssen | March 9 2010 08:52
Thanks Lee, I should've mentioned in the post that a recycle of the application pool is the first thing I tried. Sometimes, IIS is just messing with you. However, seeing as though I got the SQL time-out first, it seemed unlikely that a recycle would fix it (and it didn't).

But, absolutely, try a recycle first!

Avatar for Henri Henri | October 2 2012 13:58
Ugh, an old site has started doing this on a weekly basis. Only solution that i have found is to recycle the app pool.

Annoying as hell, and I'd rather not update the site. Did anyone ever figure out what caused this?