Object Reference Not set to and instance of an object"

Posted by Community Admin on 04-Aug-2018 18:42

Object Reference Not set to and instance of an object"

All Replies

Posted by Community Admin on 11-Nov-2014 00:00

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

Posted by Community Admin on 11-Nov-2014 00:00

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

Posted by Community Admin on 14-Nov-2014 00:00

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
 

Posted by Community Admin on 29-Mar-2016 00:00

Was there a fix for this? I have encountered the same problem in Sitefinity 7.2.5310.0. Thanks

Posted by Community Admin on 01-Apr-2016 00:00

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
 

Posted by Community Admin on 01-Apr-2016 00:00

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.

This thread is closed