Copied to clipboard

Flag this post as spam?

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


  • Devin 87 posts 251 karma points
    Jan 21, 2014 @ 13:41
    Devin
    0

    Move Post works but receive an error

    Hi guys,

    Not sure if anyone has a fix? Moving posts does actually work as in the post does get moved, but after choosing the new category and hitting submit, I received the below error. This also occurs on an untouched installation of nForum so it's bugged I guess.

    private void GetForumNodes()
            {
                Post = Mapper.MapForumPost(UmbracoAppHelpers.GetPage(ChildPostNode.ToInt32()));
                Topic = Post.ParentTopic(); <-- IT DOESNT LIKE THIS
                Category = Topic.ParentCategory();
            }

     

    public ForumTopic ParentTopic()
    {
    return this.ParentId != null ? _mapper.MapForumTopic(UmbracoAppHelpers.GetPage(this.ParentId.ToInt32())) : null;
    }

    Current stack trace:

     

    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.usercontrols.nForum.ForumMoveTopic.GetForumNodes() in c:\Users\****\Desktop\nForum\Source\nForum\usercontrols\nForum\ForumMoveTopic.ascx.cs:33
       nForum.usercontrols.nForum.ForumMoveTopic.Page_Load(Object sender, EventArgs e) in c:\Users\****\Desktop\nForum\Source\nForum\usercontrols\nForum\ForumMoveTopic.ascx.cs:23
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +91
       System.Web.UI.Control.LoadRecursive() +74
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

     

Please Sign in or register to post replies

Write your reply to:

Draft