+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Object Reference Not set to and instance of an object"

Object Reference Not set to and instance of an object"

6 posts, 0 answered
  1. Doc
    Doc avatar
    2 posts
    Registered:
    06 May 2013
    11 Nov 2014
    Link to this post

    Hi,

    I was trying to edit a page and click on ungroup other pages and now I'm getting the Object Reference Not set to and instance of an object" error.  And it's not letting me into pages section any more.  I can't go back and undue or edit any pages.  how to fix? 

    Thanks,
    Doc

  2. Doc
    Doc avatar
    2 posts
    Registered:
    06 May 2013
    11 Nov 2014
    Link to this post

    More info:

     

    Stack Trace:
    [NullReferenceException: Object reference not set to an instance of an object.]
       Telerik.Sitefinity.Modules.Pages.PageHelperImplementation.GetTheme(PageDraft pageDraft, PageTemplate baseTemplate) +67
       Telerik.Sitefinity.Modules.Pages.PageDraftProxy..ctor(PageDraft pageData, PageNode pageNode, PageDataProvider provider, Boolean isPreview, CultureInfo objectCulture, Boolean isInlineEditing) +2093
       Telerik.Sitefinity.Web.PageEditorRouteHandler.GetPageData(SiteMapNode node) +3185
       Telerik.Sitefinity.Web.RouteHandler.GetHttpHandler(RequestContext requestContext) +153
       System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +12673414
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +164

  3. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    14 Nov 2014
    Link to this post
    Hi Doc,

    I would suggest to open up a support ticket for this. In case you do so please provide us with the exact steps to reproduce. I would also suggest to prepare a backup of the project and database in case we need to debug on our end.

    Regards,
    Pavel Benov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  4. Nate
    Nate avatar
    4 posts
    Registered:
    11 Jun 2013
    29 Mar in reply to Doc
    Link to this post
    Was there a fix for this? I have encountered the same problem in Sitefinity 7.2.5310.0. Thanks
  5. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    01 Apr
    Link to this post
    Hello Nate,

    The issue is related to that bug which is already fixed in later version than your:
    http://feedback.telerik.com/Project/153/Feedback/Details/126988-reverting-a-page-to-a-group-page-and-then-back-to-a-normal-page-causes-an-error

    In order to fix this you can run the following code in an .aspx page on back-up project in advance:
    var pman = PageManager.GetManager();
     
    var nodes = pman.GetPageNodes().Where(p => p.RootNodeId == SiteInitializer.FrontendRootNodeId && p.NodeType == Telerik.Sitefinity.Pages.Model.NodeType.Standard);
     
      foreach (var node in nodes)
      {
        var pagedata = pman.GetPageDataList().Where(d => d.NavigationNodeId == node.Id);
        if (pagedata.Count() == 0)
        {
          node.NodeType = Telerik.Sitefinity.Pages.Model.NodeType.Group;
        }
      }
    pman.SaveChanges();

    I hope this helps.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  6. Nate
    Nate avatar
    4 posts
    Registered:
    11 Jun 2013
    01 Apr in reply to Svetoslav Manchev
    Link to this post
    Resetting the NodeType to Group is what I figured out as a solution as well. Thanks for confirming that this is the workaround for my version of Sitefinity.
6 posts, 0 answered