Copied to clipboard

Flag this post as spam?

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


  • James 2 posts 22 karma points
    Aug 02, 2011 @ 15:52
    James
    0

    'Object reference not set' after changing doc type

    I made a change to a document type (renamed a property and its alias, and added another property) and now a user control that calls node.ChildrenAsTable("doctypealias") is giving 'Object reference not set to an instance of an object'. I've confirmed that node != null.

    I'm using Umbraco 4.7.0. on a dedicated web server (full trust) running IIS7. 

    I've tried recycling app pool, restarting IIS, deleting umbraco.config, touching web.config, re-uploading the user control, republishing entire site. Nothing works.

    To clarify, the user control gets the current node, and tries then to call ChildrenAsTable() on the current node. The current node's children are pages of the doctype that I edited.

    Please help!!

    Below is stack trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.presentation.nodeFactory.Node.populateRow(DataRow& dr, Node n, Hashtable AliasesToNames) +662
       umbraco.presentation.nodeFactory.Node.ChildrenAsTable(String nodeTypeAliasFilter) +579
       usercontrols_ListAccommodation.Page_Load(Object sender, EventArgs e) in c:\mysite\usercontrols\ListAccommodation.ascx.cs:16
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
       System.Web.UI.Control.LoadRecursive() +70
       System.Web.UI.Control.LoadRecursive() +189
       System.Web.UI.Control.LoadRecursive() +189
       System.Web.UI.Control.LoadRecursive() +189
       System.Web.UI.Control.LoadRecursive() +189
       System.Web.UI.Control.LoadRecursive() +189
       System.Web.UI.Control.LoadRecursive() +189
       System.Web.UI.Control.LoadRecursive() +189
       System.Web.UI.Control.LoadRecursive() +189
       System.Web.UI.Control.LoadRecursive() +189
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3063

  • James 2 posts 22 karma points
    Aug 02, 2011 @ 18:17
    James
    0

    I've found that republishing all the nodes of the sub doctype manually fixed the problem. I suspect it may have something to do with the fact that problem doctype was a root doctype, but its nodes were published as sub doctypes.

    Hope that helps

  • Henrik 12 posts 32 karma points
    Aug 23, 2011 @ 14:49
    Henrik
    0

    Hi James - thanks for this, I was really scratching my head! This solved my similar problem with ChildrenAsTable.

Please Sign in or register to post replies

Write your reply to:

Draft