'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
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.
'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:
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
Hi James - thanks for this, I was really scratching my head! This solved my similar problem with ChildrenAsTable.
is working on a reply...