1.4 crashed my Orchard

Topics: Troubleshooting
Mar 5, 2012 at 9:50 AM
Edited Mar 5, 2012 at 9:51 AM

Hi guys, After installing 1.4 Advanced Menu, and pressing "new menu" which crashed, I can't go into Admin dashboard anymore.

 

[NullReferenceException: Object reference not set to an instance of an object.] Szmyd.Orchard.Modules.Menu.Services.MenuService.GetMenuItems(String menuName) +59 Szmyd.Orchard.Modules.Menu.Providers.NavigationProviderFactory.<get_Providers>b__1(AdvancedMenuPart m) +121 System.Linq.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x) +32 System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +151 Szmyd.Orchard.Modules.Menu.Providers.<get_Providers>d__2.MoveNext() +361 Orchard.UI.Navigation.<GetSources>d__c.MoveNext() in c:\Users\sebros\My Projects\Orchard\src\Orchard\UI\Navigation\NavigationManager.cs:90 System.Linq.<SelectManyIterator>d__14`2.MoveNext() +174 System.Linq.Buffer`1..ctor(IEnumerable`1 source) +325 System.Linq.Enumerable.ToArray(IEnumerable`1 source) +78 Orchard.UI.Navigation.NavigationManager.Merge(IEnumerable`1 sources) in c:\Users\sebros\My Projects\Orchard\src\Orchard\UI\Navigation\NavigationManager.cs:131 Orchard.UI.Navigation.NavigationManager.BuildMenu(String menuName) in c:\Users\sebros\My Projects\Orchard\src\Orchard\UI\Navigation\NavigationManager.cs:29 Szmyd.Orchard.Modules.Menu.Filters.MenuFilter.OnResultExecuting(ResultExecutingContext filterContext) +114 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +45 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +177 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343 System.Web.Mvc.Controller.ExecuteCore() +116 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10 System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21 System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12 System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62 System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50 System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Mvc\Routes\ShellRoute.cs:147 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8966925 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Mar 5, 2012 at 1:52 PM

I ran into the same issue.  There appears to be an issue while creating a new menu, the menu name isn't saved.  I was able to update the entry in the table "Szmyd_Orchard_Modules_Menu_AdvancedMenuPartRecord"  to get back up and running.

Coordinator
Mar 5, 2012 at 3:14 PM

Hmm thanks for the info - I'll investigate it and push a fix (if needed) asap!

Coordinator
Mar 5, 2012 at 3:42 PM

Fixed. There was a code leftover which I forgot to remove - that was causing issues.

Mar 5, 2012 at 11:12 PM

I've found another bug... page names have been reset to "Page" and I can't edit them...

It did work up to a point, but I haven't done anything that could mess it up.

 

[NullReferenceException: Object reference not set to an instance of an object.]
   Szmyd.Orchard.Modules.Menu.Drivers.<>c__DisplayClasse.<Editor>b__4(AdvancedMenuPart m) in e:\01 CODE\01 U IZRADI\WhyGo.Orchard.Web.1.4.0\WhyGo.Orchard\Modules\Szmyd.Orchard.Modules.Menu\Drivers\MenuRelationPartDriver.cs:44
   System.Linq.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x) +32
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +151
   System.Linq.<UnionIterator>d__88`1.MoveNext() +365
   System.Linq.Enumerable.Count(IEnumerable`1 source) +225
   ASP._Page_Modules_Szmyd_Orchard_Modules_Menu_Views_EditorTemplates_Parts_Menu_RelationPart_cshtml.Execute() in e:\01 CODE\01 U IZRADI\WhyGo.Orchard.Web.1.4.0\WhyGo.Orchard\Modules\Szmyd.Orchard.Modules.Menu\Views\EditorTemplates\Parts\Menu.RelationPart.cshtml:8
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +81
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +220
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
   System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection) +279
   System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper htmlHelper, String partialViewName) +71
   Orchard.Core.Shapes.CoreShapes.RenderInternal(HtmlHelper Html, TextWriter Output, String TemplateName, Object Model, String Prefix) in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:647
   Orchard.Core.Shapes.CoreShapes.EditorTemplate(HtmlHelper Html, TextWriter Output, String TemplateName, Object Model, String Prefix) in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:635

Coordinator
Mar 5, 2012 at 11:15 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Mar 6, 2012 at 9:41 AM

Could you please provide repro steps in the comments to the work item (link above)? I couldn't repro that locally.

Mar 6, 2012 at 12:00 PM

I've realized what I did... I've removed "title" part from the "page" content type.

Maybe that was causing the error? It sure was causing the problem as to why they are named "page" in the admin area.

Coordinator
Mar 6, 2012 at 2:26 PM

Oh, that is surely the cause of the error. That null reference happens when the module is trying to get the TitlePart on a given item at loading time. The TitlePart has to be there.

I should have asked in first place - was there any specific reason that you had to remove it? If you need to hide a title from being displayed that should be done differently.

Btw - TitlePart was introduced with Orchard 1.4 - instead of having a single RoutePart, as it was before, now we have TitlePart and AutoroutePart. 

Mar 6, 2012 at 2:30 PM

I've put it back now, I was just testing something. I will remove it via View files, no problem.

 

I am glad we found this error. You might want to put some message or something in case someone else does that :)

Aug 21, 2012 at 5:18 PM

I just had this error. Found a record in Szmyd_Orchard_Modules_Menu_AdvancedMenuPartRecord table with NULL for the name value. I deleted that record and all is fixed now.