Copied to clipboard

Flag this post as spam?

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


  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Nov 29, 2012 @ 11:28
    Jeavon Leopold
    0

    Issue upgrading from v4.10.1 to v4.11.1 - Object reference not set to an instance of an objec

    Has anyone else experienced the YSOD below on every node in the Umbraco UI following upgrade from v4.10.1 to v4.11.1?

    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: 
    
    Line 98:            if (umbracoContext == null) throw new ArgumentNullException("umbracoContext");
    Line 99: 
    Line 100:           return ConvertToDocument(GetXml(umbracoContext).GetElementById(nodeId.ToString()));
    Line 101:       }
    Line 102:
    
    Source File: C:\x\Umbraco CodePlex\src\Umbraco.Web\DefaultPublishedContentStore.cs    Line: 100 
    
    Stack Trace: 
    
    [NullReferenceException: Object reference not set to an instance of an object.]
       Umbraco.Web.DefaultPublishedContentStore.GetDocumentById(UmbracoContext umbracoContext, Int32 nodeId) in C:\x\Umbraco CodePlex\src\Umbraco.Web\DefaultPublishedContentStore.cs:100
       Umbraco.Web.Routing.NiceUrlProvider.GetNiceUrl(Int32 nodeId, Uri current, Boolean absolute) in C:\x\Umbraco CodePlex\src\Umbraco.Web\Routing\NiceUrlProvider.cs:98
       Umbraco.Web.Routing.NiceUrlProvider.GetNiceUrl(Int32 nodeId) in C:\x\Umbraco CodePlex\src\Umbraco.Web\Routing\NiceUrlProvider.cs:51
       umbraco.cms.presentation.editContent.UpdateNiceUrls() in C:\x\Umbraco CodePlex\src\Umbraco.Web\umbraco.presentation\umbraco\editContent.aspx.cs:382
       umbraco.cms.presentation.editContent.OnPreRender(EventArgs e) in C:\x\Umbraco CodePlex\src\Umbraco.Web\umbraco.presentation\umbraco\editContent.aspx.cs:224
       System.Web.UI.Control.PreRenderRecursiveInternal() +103
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
       
  • Stephen 767 posts 2273 karma points c-trib
    Nov 29, 2012 @ 14:04
    Stephen
    0

    Not that I am aware of. An exception at that point is quite strange. Did you try to restart the website (touch web.config or even iisreset, and delete umbraco.config)?

  • Stephen 767 posts 2273 karma points c-trib
    Nov 29, 2012 @ 14:13
    Stephen
    0

    Also can you look at the umbraco log? Does it contains stuff about the database, reloading the cache, etc?

    At that point, either GetXml(...) is null or nodeId is null. I absolutely fail to see how nodeId could be null... but GetXml(...) could be null if loading content from the database fails.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Nov 29, 2012 @ 15:38
    Jeavon Leopold
    0

    Hi Stephen, yes indeed, I did try all of the normal resolution techniques first, but it required some detailed digging. 

    In case anyone else has the same issue, I did eventually trace this to several entries in the cmsContentVersion table that had no corresponding entries in the cmsPreviewXml table, obviously at some point in history this data has become orphaned and therefore corrupted.

    To repeat the resolution, you would need to identify the issue node and content version then run substituting the Guid and id for your own in the below, execute on your database:

    DELETE FROM cmsContentVersion WHERE ContentID='1079' and versionId='4df642fc-b77e-479c-8538-223032c482cc'

    Restart application pool, delete Umbraco.config. Then publish your homepage and all children.

    Now it should work!

  • Stephen 767 posts 2273 karma points c-trib
    Nov 29, 2012 @ 16:45
    Stephen
    0

    Umbraco should *not* quietly swallow such an inconsistency and pretend there's no content ! Did you get any error message in the log?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Nov 29, 2012 @ 20:01
    Jeavon Leopold
    0

    No, it should not, but it is certainly not the first time I have had to delete broken versions of content in the DD, no idea how it happens though. There is nothing apart for the YSOD in the log.

  • Braydie 148 posts 346 karma points
    Feb 20, 2013 @ 13:43
    Braydie
    0

    I've just upgraded to v6 and have this issue. I followed what you've done Jeavon but still have see the same error. Is this related to this issue? http://issues.umbraco.org/issue/U4-1250

Please Sign in or register to post replies

Write your reply to:

Draft