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.
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'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!