Admin Error Help! Object reference not set to an instance of an object
Bit of a major problem just occurred, a live site's admin section is constantly throwing the following error if you click on any node in the site tree??
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) +54
umbraco.controls.ContentControl..ctor(Content c, publishModes CanPublish, String Id) +756
umbraco.cms.presentation.editContent.OnInit(EventArgs e) +368
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
It was working fine this morning, only thing I know of that's changed is client set two articles to publish today @ 12.00 using the 'publish at' feature? Now when I login, click on the home node or any other and I get this?
I have checked the UmbracoLog and this is the log
At /umbraco/editContent.aspx?id=1235 (Referred by: http://www.mysite.co.uk/umbraco/TreeInit.aspx): System.NullReferenceException: Object reference not set to an instance of an object.
at umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption)
at umbraco.controls.ContentControl..ctor(Content c, publishModes CanPublish, String Id)
at umbraco.cms.presentation.editContent.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I have to pop out now, but need to get this sorted quickly as soon as I return? Any ideas of what could have caused this? Anyone experienced anything similar when using the 'publish at' feature
Its a DB problem, I restored a backup from yesterday and its working fine again? I'm thinking it might be down to a datatype value change which a lot of nodes reference.
When DropDownList DataType's are used on a node, is the Text & Value stored? or just the Value (The ID)?
Thats whats weird, the ID stayed the same - Only the Text value changed as there was a spelling mistake. Its either the datatype text value being changed, or something to do with the publish at feature.
At the moment I'm moving towards the DataType Text value as this was changed in the database? But I thought only the ID was stored so it wouldn't make a difference to nodes referencing the datatype :S
Probably a modification on a doctype caused this issue. All properties are updated during that proces but not in a transaction which means that if one fails this error occurs. Had it once on a live site also and wrote a blogpost how to solve it so check that out here
Encountered the same issue after manually deleting all instances of a property and then the property itself directly from the database. I recycled the app pool as suggested and everything looks good now.
Admin Error Help! Object reference not set to an instance of an object
Bit of a major problem just occurred, a live site's admin section is constantly throwing the following error if you click on any node in the site tree??
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
It was working fine this morning, only thing I know of that's changed is client set two articles to publish today @ 12.00 using the 'publish at' feature? Now when I login, click on the home node or any other and I get this?
I have checked the UmbracoLog and this is the log
I have to pop out now, but need to get this sorted quickly as soon as I return? Any ideas of what could have caused this? Anyone experienced anything similar when using the 'publish at' feature
Very very odd. DM me and I can help debug if you want :-)
Check the app pool. Whenever i get this i restart the app pool / site and the problem goes away.
Damn :( Restart didn't work
Media is also dead? Click on any node and get the same error? Going to have a look around the DB now and see if I can see anything out the ordinary?
Only thing that I can pin this on is something to do with the publish at feature?
Can't see anything out of the ordinary in the database? I'm going to keep looking but anyone have any other ideas of where I should be looking?
Can it be a missing dll in the bin-folder? Or perhaphs someone copied an older version into it?
Its a DB problem, I restored a backup from yesterday and its working fine again? I'm thinking it might be down to a datatype value change which a lot of nodes reference.
When DropDownList DataType's are used on a node, is the Text & Value stored? or just the Value (The ID)?
As far as I know just the value.
Makes sense that the error occurs if a particular ID has gone missing
Thats whats weird, the ID stayed the same - Only the Text value changed as there was a spelling mistake. Its either the datatype text value being changed, or something to do with the publish at feature.
At the moment I'm moving towards the DataType Text value as this was changed in the database? But I thought only the ID was stored so it wouldn't make a difference to nodes referencing the datatype :S
HI Lee,
Probably a modification on a doctype caused this issue. All properties are updated during that proces but not in a transaction which means that if one fails this error occurs. Had it once on a live site also and wrote a blogpost how to solve it so check that out here
Hope it helps you,
Richard
Great post Richard :) Thanks
Just had this happen here with a site in dev environment. Thanks for the heads-up :-)
I had the same error after a modification in a document type as well. It was a new child document type.
I deleted it and everything was working correctly after that :-)
Encountered the same issue after manually deleting all instances of a property and then the property itself directly from the database. I recycled the app pool as suggested and everything looks good now.
Thanks!
Craig
is working on a reply...