- 4
in Menu7Spikes.cshtml
new code
old code
Error message
new code
var adminMenuPlugins = EngineContext.Current.Resolve<Nop.Core.Plugins.IPluginFinder>()
.GetPlugins<IAdminMenuPlugin>()
.Where(x => x.Authenticate() && x.PluginDescriptor.SystemName.Contains("SevenSpikes"))
.ToList();
old code
var adminMenuPlugins = EngineContext.Current.Resolve<Nop.Core.Plugins.IPluginFinder>()
.GetPlugins<IAdminMenuPlugin>()
.Where(x => x.Authenticate())
.ToList();
Error message
Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object. at ASP._Page_Plugins_SevenSpikes_Core_Views_Shared_Menu7Spikes_cshtml.Execute() in d:\Root\Nop3301\Plugins\SevenSpikes.Core\Views\Shared\Menu7Spikes.cshtml:line 57 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) at ASP._Page_Plugins_SevenSpikes_Core_Views_Shared__AdminLayout7Spikes_cshtml.Execute() in d:\Root\Nop3301\Plugins\SevenSpikes.Core\Views\Shared\_AdminLayout7Spikes.cshtml:line 11 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) at System.Web.WebPages.WebPageBase.PopContext() at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at