We've got multiple pages with DMX modules pointing to different levels in the directory structure controlled by DMX.
Simplistically - we've got a file structure
Root - Folder1 - Folder2 - Folder3
and pages
Page1 - DMX module pointing to Folder1 (which contains Folder2)
Page2 - DMX module pointing to Folder2 (which contains Folder3)
Page3 - DMX module pointing to Folder3
with different levels of permissions on the pages.
One of the users with access to Page2 did a hard-delete of Folder3. Obviously not a good idea, but then when we tried to go to Page3, we got an error on it from DNN...
Unhandled error loading module.
DotNetNuke.Services.Exceptions.ModuleLoadException: Unhandled Error Adding Module to ContentPane ---> System.NullReferenceException: Object reference not set to an instance of an object. at Bring2mind.DNN.Modules.DMX.Common.Query.ᜀ(NameValueCollection A_0, Int32 A_1, Int32 A_2, String A_3) at Bring2mind.DNN.Modules.DMX.Common.Query..ctor(HttpRequest& Request, PortalSettings& Portal, UserInfo& User, ModuleSettings& DmxModuleSettings) at Bring2mind.DNN.Modules.DMX.Framework.ModuleBase.get_Query() at Bring2mind.DNN.Modules.DMX.Dispatch.ᜀ(Object A_0, EventArgs A_1) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.UserControl.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---
We could not correct the error because the DMX module was not rendering enough to have any control points (settings) that we could use to even delete it. We had to delete and recreate the page.
I think that DMX should handle that situation more gracefully, and still allow access to its settings to be able to correct such a situation.
We're running DMX 4.2.0 under DNN 4.6.2