I add some macros to nforum, but everything was OK for a few days and then the error occured :(
Debug didn't tell me anything, or at least I don't see anything weird. Maybe you will (I'm not so experienced):
Unhandled Execution Error
Null object cannot be converted to a value type. at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType) at umbraco.Linq.Core.Node.NodeDataProvider.LoadFromXml[T](XElement xml, T node) at umbraco.Linq.Core.Node.NodeTree`1.GetEnumerator() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.OrderedEnumerable`1.d__0.MoveNext() at System.Linq.Enumerable.d__3a`1.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at nForum.usercontrols.nForum.KubaCestopisy.UkazCestopisyKuba() in D:\Umbraco\nForum\usercontrols\nForum\KubaCestopisy.ascx.cs:line 29 at nForum.usercontrols.nForum.KubaCestopisy.Page_Load(Object sender, EventArgs e) in D:\Umbraco\nForum\usercontrols\nForum\KubaCestopisy.ascx.cs:line 14 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
* please note that KubaCestopisy.ascx.cs is in fact copy of ForumActiveTopics.ascx.cs with just a slight change (I've used it for some time without any problem).
To clarify the situation - I'm not able to browse nforum. Every page that has any macro from nforum doesn't work - Null object cannot be converted to a value type error occures every time. But I can browse any other page, therefore I suspect nforum for having some problem, but I don't know where it could be...
In fact I can't even click root node (Content) in Content section of Umbraco administration (the same error appears, probably because there is some nforum panel), but I can browse nforum content (all nodes of nforum) in administration (and that's weird).
yes, there have been some changes in document types etc, but I double check it now to be sure, it doesn't refere to nonexisting nodes.
Weird is, that everything worked for few days and then suddenly error appeared.
Isn't it possible that there is some problem with any kind of cache or xml file that nforum creates? It seems to me like some connection between nodes is broken. So maybe "reseting" nforum to reload all xml files and nodes would help, but I dunno how to do that and if it is even possible... Simple republishing etc don't work.
Null object cannot be converted to a value type
Hi guys,
I use nforum for more than a year now (1.2 on Umbraco 4.7.1).
Suddenly I'm getting error Null object cannot be converted to a value type. The page wont load :-(
As far as I found out, it is related just to nodes that has to do something with nforum (that contains any macro from nforum).
When I tried debug mode, error leads to row 29 in file ForumActiveTopics.ascx.cs:
maintopics = (from t in u.ForumTopics
I found this thread http://our.umbraco.org/forum/ourumb-dev-forum/bugs/20901-umbraco-to-linq-null-object-issue-plus-solution-%28not-really%29 but problem is that I can't save all nodes in nforum, as I have hundreds of them, so I can't try if it works or not.
Does anyone know about solution to this?
Thank you a lot in advance!
Tom
Hi Tom and welcome to our :)
Have you changed anything in the installation? Or installed a new package for instance?
What happens if you browse to the forum and add ?umbdebugshowtrace=1 - does the trace log give any further clues?
/Jan
Hi Jan,
thank you for your reply!
I add some macros to nforum, but everything was OK for a few days and then the error occured :(
Debug didn't tell me anything, or at least I don't see anything weird. Maybe you will (I'm not so experienced):
Null object cannot be converted to a value type.
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at umbraco.Linq.Core.Node.NodeDataProvider.LoadFromXml[T](XElement xml, T node)
at umbraco.Linq.Core.Node.NodeTree`1.GetEnumerator()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.OrderedEnumerable`1.d__0.MoveNext()
at System.Linq.Enumerable.d__3a`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at nForum.usercontrols.nForum.KubaCestopisy.UkazCestopisyKuba() in D:\Umbraco\nForum\usercontrols\nForum\KubaCestopisy.ascx.cs:line 29
at nForum.usercontrols.nForum.KubaCestopisy.Page_Load(Object sender, EventArgs e) in D:\Umbraco\nForum\usercontrols\nForum\KubaCestopisy.ascx.cs:line 14
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
* please note that KubaCestopisy.ascx.cs is in fact copy of ForumActiveTopics.ascx.cs with just a slight change (I've used it for some time without any problem).
Don't know if pasting of the whole trace information will help to determine the problem, I think it have to do something with our.umbraco.org/.../20901-umbraco-to-linq-null-object-issue-plus-solution-(not-really) but I don't know how to solve it at all :(
To clarify the situation - I'm not able to browse nforum. Every page that has any macro from nforum doesn't work - Null object cannot be converted to a value type error occures every time. But I can browse any other page, therefore I suspect nforum for having some problem, but I don't know where it could be...
In fact I can't even click root node (Content) in Content section of Umbraco administration (the same error appears, probably because there is some nforum panel), but I can browse nforum content (all nodes of nforum) in administration (and that's weird).
Root node in Content section of Umbraco administration throws above mentioned error, but the trace seems little different:
Error leads to ForumMainDashboard.ascx.cs where nforum loads and display bad posts (spam). In my case it throws mentioned error.
Nobody knows how to solve this? :-(
Hi Tom
Coming to think of it this may be due to some changes in the backoffice perhaps?
Has there been any modifications done on document types in Umbraco? Have some pickers been used, which referene nodes that no longer exists etc.?
/Jan
Hi Jan,
yes, there have been some changes in document types etc, but I double check it now to be sure, it doesn't refere to nonexisting nodes.
Weird is, that everything worked for few days and then suddenly error appeared.
Isn't it possible that there is some problem with any kind of cache or xml file that nforum creates? It seems to me like some connection between nodes is broken. So maybe "reseting" nforum to reload all xml files and nodes would help, but I dunno how to do that and if it is even possible... Simple republishing etc don't work.
Tom
is working on a reply...