Sitefinity / feather

mvc
Other
97 stars 68 forks source link

Root node defined in provider SitefinitySiteMap is null, root node cannot be null. #2047

Open sitefinitysteve opened 9 years ago

sitefinitysteve commented 9 years ago

I made a new page on the root (hybrid mode masterpage template), has an 8+4 layout on it, everything looks fine in edit and preview, but when I publish it and view it on live I see no widgets. If I inpect the markup, the layout markup is there (kinda)

http://jsbin.com/vixoroduxo/edit?html

So I checked the SF Logs and I see this

Timestamp: 06/18/2015 14:20:07

Message: HandlingInstanceID: d8e4f938-7865-46a2-83cd-d129294405cf

An exception of type 'System.InvalidOperationException' occurred and was caught.

06/18/2015 10:20:07 Type : System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Root node defined in provider SitefinitySiteMap is null, root node cannot be null. Source : System.Web Help link : Data : System.Collections.ListDictionaryInternal TargetSite : System.Web.SiteMapNode get_RootNode() HResult : -2146233079 Stack Trace : at System.Web.SiteMapNode.get_RootNode() at Telerik.Sitefinity.Frontend.GridSystem.GridControl.GetTemplate(Boolean isVirtualPath, Boolean isHtmlTemplate, String layout) at Telerik.Sitefinity.Frontend.GridSystem.GridControl.GetTemplate() at Telerik.Sitefinity.Web.UI.LayoutControl.Initialize() at Telerik.Sitefinity.Web.UI.LayoutControl.CreateChildControls()

Additional Info:

MachineName : MEDPORTALWEB TimeStamp : 06/18/2015 14:20:07 FullName : Telerik.Sitefinity.Utilities, Version=8.0.5713.0, Culture=neutral, PublicKeyToken=b28c218413bdf563 AppDomainName : /LM/W3SVC/18/ROOT-1-130790364667535563 ThreadIdentity : WindowsIdentity : IIS APPPOOL\ca.medportal.www Requested URL : http://www.medportal.ca/contact

Category: ErrorLog

Priority: 0

EventId: 9010

Severity: Warning

Title:Enterprise Library Exception Handling

Machine: MEDPORTALWEB

App Domain: /LM/W3SVC/18/ROOT-1-130790364667535563

ProcessId: 6552

Process Name: c:\windows\system32\inetsrv\w3wp.exe

Thread Name:

Win32 ThreadId:1940

Extended Properties:

sitefinitysteve commented 9 years ago

I used a native\default SF 67\33 layout, everything renders fine

ElenaGaneva commented 9 years ago

Hi Steve,

Feather provides set of grid widgets that could be used to shape your layout when using pure MVC pages. Feather automatically registers different grid widgets for the default packages (Bootstrap, Foundation, SemanticUI) and you can find these grid widgets while editing page or template in the toolbox when you switch to Layout. Please notice that these grid widgets are specific for the package and they depend on the styles that are defined in the layout files, therefore Bootstrap grid widgets will shape your layout only when using them on pure MVC page based on Bootstrap and so on.

In case you use hybrid page I can suggest you use old layout elements like (67% + 33%). If you still want to take advantage of any of the new grid widgets like Bootsrap grid widgets please make sure to refer Bootstrap (or Foundation, or SemanticUI) styles inside your master file:


    @Html.Section("head")
    @Html.StyleSheet(Url.WidgetContent("~/ResourcePackages/Bootstrap/assets/dist/css/styles.min.css"), "head")

Actually you can notice that we do the same in Feather’s packages:

https://github.com/Sitefinity/feather-packages/blob/master/Bootstrap/MVC/Views/Layouts/default.cshtml

Please let me know if you need any additional clarifications on the matter, or if I have misunderstood you in any way.

Regards, Elena

sitefinitysteve commented 9 years ago

We're using these layouts allover the place...we have the default toolboxes disabled and instead have a new node that points to them manually, see here: http://pastebin.com/EHSnBAVi

It's just in THIS case on THIS page nothing is rendered inside them and the reason why is in the error log (as seen above)

We already have the bootstrap styles\scripts loaded in hybrid mode

Video of the issues: http://screencast.com/t/sdaR1Fs3 ....not specifically the one above though

cduvall commented 9 years ago

I just encountered this issue this morning.

I resolved it by removing the page permissions associated with all pages and republishing the individual page.

I can't say that was 100% the cause, it may have even been the act of republication, but my authenticated session (backend) could view the page fine, but the unauthenticated session (front end) was not able to do so.

edernucci commented 8 years ago

I'm running this issue right now (Sitefinity 9.1.6110.0 PU), getting the same error on Sitefinity's Log.

Will try to break and change page permissions to see if it solves the issue, but any help will be appreciated.

ckincincy commented 7 years ago

Can we get this fixed? Just went through a support ticket over the same issue (they referenced this).