Thursday, January 5, 2012

Exeception: admin/Menus/DNNActions OR DotNetNuke.UI.Containers.ActionButtonList.get_ModuleActions throws null reference exception

Problem:

If you have deleted or your dotnetnuke installation failed to install DDR Menu module, you will get following.

an error has occurred. DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Containers.ActionButtonList.get_ModuleActions() at DotNetNuke.UI.Containers.ActionButtonList.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

OR

An error has occurred.DotNetNuke.Services.Exceptions.PageLoadException: Couldn't load menu style 'admin/Menus/DNNActions': System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Web.DDRMenu.DNNCommon.DNNContext.get_ModuleFolder() at DotNetNuke.Web.DDRMenu.DNNCommon.PathResolver.Resolve(String path, RelativeTo[] roots) at DotNetNuke.Web.DDRMenu.MenuBase.Instantiate(String menuStyle) ---> System.ApplicationException: Couldn't load menu style 'admin/Menus/DNNActions': System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Web.DDRMenu.DNNCommon.DNNContext.get_ModuleFolder() at DotNetNuke.Web.DDRMenu.DNNCommon.PathResolver.Resolve(String path, RelativeTo[] roots) at DotNetNuke.Web.DDRMenu.MenuBase.Instantiate(String menuStyle) at DotNetNuke.Web.DDRMenu.MenuBase.Instantiate(String menuStyle) at DotNetNuke.Web.DDRMenu.DDRMenuControl.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

Solution

It is a good news if you are installing your new dnn instance, you can download latest installation source from dotnetunke.codeplex.com and that will work just fine.

If you are already having dnn site running and you uninstalled the  DDR menu  by mistake, or you are upgrading the site or DDR menu  and that caused this problem, there are some ways to fix this.

Download and setup local copy of fresh dnn installation and do following:

  1. Open web.config of fresh install, and search ddr in it. Copy the DDR entry from it and paste it to appropriate section of your site's web.config.
  2. from fresh install replace /admin/menus and /desktopmodules/ddrmenu folders to your site folder.
  3. download  http://dnnddrmenu.codeplex.com/releases/70987/download/264940 and paste it into /install/module folder
  4. Browser for yoursite.com/Install/install.aspx?mode=InstallResources and that's it
In my case, we were trying to upgrade the DDR menu and found the broken site that was restored using above steps. 

For more updates and hints visit this thread on dotnetnuke forums

2 comments:

Please add your valuable comments about this post if it helped you. Thanks