Umbraco - Object reference not set..
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.
3 comments on this article
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)
Thanks Lee, I should\u0027ve 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\u0027t).\u003Cbr /\u003E\u003Cbr /\u003EBut, absolutely, try a recycle first!
Ugh, an old site has started doing this on a weekly basis. Only solution that i have found is to recycle the app pool.\u003Cbr /\u003E\u003Cbr /\u003EAnnoying as hell, and I\u0027d rather not update the site. Did anyone ever figure out what caused this?