Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lee 1130 posts 3088 karma points
    Feb 06, 2010 @ 13:50
    Lee
    0

    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

  • Jamie Howarth 306 posts 773 karma points c-trib
    Feb 06, 2010 @ 15:03
    Jamie Howarth
    0

    Very very odd. DM me and I can help debug if you want :-)

  • Aron Gamble 63 posts 76 karma points
    Feb 06, 2010 @ 15:22
    Aron Gamble
    0

    Check the app pool. Whenever i get this i restart the app pool / site and the problem goes away.

  • Lee 1130 posts 3088 karma points
    Feb 06, 2010 @ 16:26
    Lee
    0

    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?

  • Lee 1130 posts 3088 karma points
    Feb 06, 2010 @ 16:37
    Lee
    0

    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?

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 06, 2010 @ 16:47
    Peter Dijksterhuis
    0

    Can it be a missing dll in the bin-folder? Or perhaphs someone copied an older version into it?

  • Lee 1130 posts 3088 karma points
    Feb 06, 2010 @ 16:52
    Lee
    0

    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)?

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 06, 2010 @ 17:06
    Peter Dijksterhuis
    0

    As far as I know just the value.

    Makes sense that the error occurs if a particular ID has gone missing

  • Lee 1130 posts 3088 karma points
    Feb 06, 2010 @ 17:26
    Lee
    0

    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

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Feb 07, 2010 @ 08:41
    Richard Soeteman
    1

    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

  • Lee 1130 posts 3088 karma points
    Feb 07, 2010 @ 09:19
    Lee
    0

    Great post Richard :)  Thanks

  • Jamie Howarth 306 posts 773 karma points c-trib
    Feb 19, 2010 @ 16:02
    Jamie Howarth
    0

    Just had this happen here with a site in dev environment. Thanks for the heads-up :-)

  • MrFlo 159 posts 403 karma points
    Jan 24, 2011 @ 23:13
    MrFlo
    0

    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 :-)

  • Craig Taylor 29 posts 69 karma points
    Feb 25, 2011 @ 16:13
    Craig Taylor
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft