"Object reference not set to an instance of an object " error on all pages but forum root
I've tried installing nForum on 3 different Umbraco installations (that are fully operational) and everytime the forum root displays just fine, but whenever I try to actually use the forum (e.g. create a category) or press the "Edit Profile" button I get the error below. I'm running:
umbraco v
4.7.1.1 (Assembly version: 1.0.4393.24044)
And I've tried using the forum as it is, or integrated it into my Masterpages/website (the root showed just fine again, same problem.. ).
Any ideas? :(
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.]
nForum.BusinessLogic.Models.ForumMember..ctor(Nullable`1 memberId) +206
nForum.BusinessLogic.MembershipHelper.ReturnMember(Nullable`1 memberid) +179
nForum.BusinessLogic.BaseForumUsercontrol.get_CurrentMember() +50
nForum.usercontrols.nForum.membership.ForumMemberProfileEdit.LoadProfile() +17
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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3063
Its a problem with the members, do you have a custom property or something on the members? Best thing would be to grab the source and debug, that will show you exactly what the problem is.
Update: I've tried creating a new user of Forum User type and added him only to the ForumUser membergroup ignoring the rest of my membergroups/types. No difference.. I manually created a Forum Category in the Umb. backend, it cast an error but created the category - when I click on it though the Object reference error is the same.
Also, it seems that the Examine assembly doesn't load correctly? I've checked all the quicksteps on your blog checking that everything is there, which it is even in the examine config and settings, but when I try to use the search or the member search feature I get the follow:
Could not load file or assembly 'Examine, Version=0.10.0.292, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Could that be what's wrong with the general forum?
This is upon click on my Forum category (Any ideas? :( ):
Unhandled Execution Error
Object reference not set to an instance of an object. at nForum.BusinessLogic.Models.Forum.MapForumNodeToModel(INode forumRoot) at nForum.BusinessLogic.Models.Forum..ctor() at nForum.BusinessLogic.Helpers.MainForumSettings() at nForum.usercontrols.nForum.ForumTopics.GetTopicsFromCategory() at nForum.usercontrols.nForum.ForumTopics.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(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.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I get the same problem. For me the forum only works when it is at the root level. When I put it under the Home node the category pages that previously worked error:
[NullReferenceException: Object reference not set to an instance of an object.]
nForum.usercontrols.nForum.ForumTopics.GetTopicsFromCategory() +526
nForum.usercontrols.nForum.ForumTopics.Page_Load(Object sender, EventArgs e) +62
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.Control.LoadRecursive() +189
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3063
Its so hard to try and tell you what the issues are when you are installing into a custom scenario. As I mention on my blog, I have tested and tested in normal scenarios, as you can see from the video above. And also outlined the properties and files which should be present in the install.
But when it comes to custom installs/full customisations, then as I mention in my blog - Grab the source code off codeplex, and then debug it using the 'attach to process' trick and you'll quickly and easily find the issue.
There is a link in my blog post which Nick has posted above that gives you a lot of tutorials on how to attach to process and debug an umbraco site using VS.
The thing is, I've tried installing nForum on a blank 4.7 installation too, with the same result :( Both locally and on my Windows Server 2008 R2 x64 it bugs out.
I haven't had time to get and debug the source code yet, but I'm confused as to why this seems to be happening on all my nForum installations.
Update: I fixed it by uninstalling nForum, then removing any trace I could find of it in the config files and in the ExamineIndexes,I then removed all my members and membertype (oi humbug), installed nForum and manually created all my members again as Forum Users (having removed the other type).
It seems that nForum doesn't play along when there are other types than Forum Users, even if they won't be using the forum.
I'm also getting the same error. I installed nForum under my master templates. Everything working fine but when I clicked on Category link it come with error "object reference not set to an instance of an object".
Error details:
Object reference not set to an instance of an object. at nForum.usercontrols.nForum.ForumTopics.GetTopicsFromCategory() at nForum.usercontrols.nForum.ForumTopics.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive()
Please advise any help as I'm new to umbraco/nForums.
Please get the source and step through you'll find the answer in about 2 minutes, saves us spending 20mins to hours going backwards and forwards taking pot luck guesses.
I've just tried to install nForum and get the following:
[41] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 25] An unhandled exception occurred System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object. at ASP.masterpages_forummaster_master.__Render__control8(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.WebControls.LoginView.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at ASP.masterpages_forummaster_master.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at umbraco.presentation.masterpages._default.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at umbraco.UmbracoDefault.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Interestingly I re-watched your video and notice that at one point you whip up to the root node and publish (I think). I republished all nodes from the root inc all child nodes ( I am running all content under a Site node with global settings) and now it works!!!
Not sure what happened there but maybe it means something to someone.
Now all I have to do is integrate with the site (style menu etc) :)
i have also a same problem when i click on link like active topic and topics in which you participate then it gives error
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.
"Object reference not set to an instance of an object " error on all pages but forum root
I've tried installing nForum on 3 different Umbraco installations (that are fully operational) and everytime the forum root displays just fine, but whenever I try to actually use the forum (e.g. create a category) or press the "Edit Profile" button I get the error below. I'm running:
umbraco v 4.7.1.1 (Assembly version: 1.0.4393.24044)
And I've tried using the forum as it is, or integrated it into my Masterpages/website (the root showed just fine again, same problem.. ).
Any ideas? :(
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:
Its a problem with the members, do you have a custom property or something on the members? Best thing would be to grab the source and debug, that will show you exactly what the problem is.
I have a custom Member Type nd Group, but that's it. Upon install the forum member types are created, can't they play along with other types/groups?
Update: I've tried creating a new user of Forum User type and added him only to the ForumUser membergroup ignoring the rest of my membergroups/types. No difference.. I manually created a Forum Category in the Umb. backend, it cast an error but created the category - when I click on it though the Object reference error is the same.
Also, it seems that the Examine assembly doesn't load correctly? I've checked all the quicksteps on your blog checking that everything is there, which it is even in the examine config and settings, but when I try to use the search or the member search feature I get the follow:
Could not load file or assembly 'Examine, Version=0.10.0.292, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Could that be what's wrong with the general forum?
This is upon click on my Forum category (Any ideas? :( ):
Object reference not set to an instance of an object.
at nForum.BusinessLogic.Models.Forum.MapForumNodeToModel(INode forumRoot)
at nForum.BusinessLogic.Models.Forum..ctor()
at nForum.BusinessLogic.Helpers.MainForumSettings()
at nForum.usercontrols.nForum.ForumTopics.GetTopicsFromCategory()
at nForum.usercontrols.nForum.ForumTopics.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(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.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I get the same problem. For me the forum only works when it is at the root level.
When I put it under the Home node the category pages that previously worked error:
Works:
Content
Forum - http://localhost/forum.aspx
Test Category - http://localhost/test-category.aspx
Does not work:
Content
Home
Forum - http://localhost/forum.aspx
Test Category - http://localhost/forum/test-category.aspx (Errors)
I have also tried creating the test category before and after moving the forum under Home and its the same result.
Any help appreciated.
Hi Behati,
My issue was caused by me merging the templates and missing off the runat="server" on the head tag.
Maybe you have a similar problem, if not follow the debug instructions here and it should point you in the right direction.
http://www.blogfodder.co.uk/2012/1/12/nforum-v15-released point 6
Regards,
Nick
Its so hard to try and tell you what the issues are when you are installing into a custom scenario. As I mention on my blog, I have tested and tested in normal scenarios, as you can see from the video above. And also outlined the properties and files which should be present in the install.
But when it comes to custom installs/full customisations, then as I mention in my blog - Grab the source code off codeplex, and then debug it using the 'attach to process' trick and you'll quickly and easily find the issue.
There is a link in my blog post which Nick has posted above that gives you a lot of tutorials on how to attach to process and debug an umbraco site using VS.
The thing is, I've tried installing nForum on a blank 4.7 installation too, with the same result :( Both locally and on my Windows Server 2008 R2 x64 it bugs out.
I haven't had time to get and debug the source code yet, but I'm confused as to why this seems to be happening on all my nForum installations.
Update: I fixed it by uninstalling nForum, then removing any trace I could find of it in the config files and in the ExamineIndexes,I then removed all my members and membertype (oi humbug), installed nForum and manually created all my members again as Forum Users (having removed the other type).
It seems that nForum doesn't play along when there are other types than Forum Users, even if they won't be using the forum.
Hi Guys,
I'm also getting the same error. I installed nForum under my master templates. Everything working fine but when I clicked on Category link it come with error "object reference not set to an instance of an object".
Error details:
Object reference not set to an instance of an object.
at nForum.usercontrols.nForum.ForumTopics.GetTopicsFromCategory()
at nForum.usercontrols.nForum.ForumTopics.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
Please advise any help as I'm new to umbraco/nForums.
Thanks
Jazz
Please get the source and step through you'll find the answer in about 2 minutes, saves us spending 20mins to hours going backwards and forwards taking pot luck guesses.
Hi Lee,
How do I get the source? Is that not due to something I missed?
Download the source associated with the 1.5 release
http://nforum.codeplex.com/SourceControl/list/changesets
and read here too
http://www.blogfodder.co.uk/2012/1/12/nforum-v15-released
Thanks Lee,
Its fixed now!! I was missing runat=server in head tag of master template.
I've just tried to install nForum and get the following:
[41] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 25] An unhandled exception occurred
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at ASP.masterpages_forummaster_master.__Render__control8(HtmlTextWriter __w, Control parameterContainer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.WebControls.LoginView.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at ASP.masterpages_forummaster_master.__RenderContent1(HtmlTextWriter __w, Control parameterContainer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at umbraco.presentation.masterpages._default.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at umbraco.UmbracoDefault.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I looked at the checklist on http://www.blogfodder.co.uk/2012/1/12/nforum-v15-released and it says at the top: 1.) Check you have the Examine configs in, they are shown below.
I am running Umb 6.1.6 and nForum v1.7. Does the point 1 above still apply?
My Config/ExamineIndex.config does not contain the nodes shown, could that be the problem because I thought v1.7 DOES NOT use Examine?
William
Interestingly I re-watched your video and notice that at one point you whip up to the root node and publish (I think). I republished all nodes from the root inc all child nodes ( I am running all content under a Site node with global settings) and now it works!!!
Not sure what happened there but maybe it means something to someone.
Now all I have to do is integrate with the site (style menu etc) :)
i have also a same problem when i click on link like active topic and topics in which you participate then it gives error
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:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
sagar,
At what level is your forum installed under? Have you moved the forum folder underneath your website?
Try adding /forum/activetopics.aspx to the end of your website domain/url and see if you still have the same problem.
Devin
yes i have done but in selection templete when create a new i can't find active topic in the section and cant add
actually first time after install it runs but when i create new user then after not work
is working on a reply...