I recently upgraded a portal from DNN 5.2.3 to 5.6.1 and DMX from 5.2.7 to 5.3.5.
I missed this issue during testing, but I am able to recreate it in a clean DNN 5.6.1 Install with DMX 5.3.5.
In a nutshell, if you create a DMX Tempate view using all defaults, pointing to a folder in the DMX hierachy, when a user first navigates to the page, the New Item icon will have a link with CollectionId=-1 regardless of what folder you have selected in the settings.
Clicking the New icon as an admin the page will work fine. But clicking this link as a non-admin you will get an exception and a page error. Interstingly, clicking something like the Title link to sort the documents by title will refresh the UI and the New item link will have the correct CollectionId=n, such as CollectionId=4.
Here are the exception details:
ModuleId: 381
ModuleDefId: 112
FriendlyName: DMX Template Test
ModuleControlSource: DesktopModules/Bring2mind/DMX/Dispatch.ascx
AssemblyVersion: 5.6.1
PortalID: 0
PortalName: My Website
UserID: 3
UserName: Test.User1
ActiveTabID: 62
ActiveTabName: Test User 1 Page
RawURL: /dnndev56/Home/TestUser1Page.aspx?Command=Core_Edit&CollectionId=-1
AbsoluteURL: /DNNDev56/Default.aspx
AbsoluteURLReferrer:
http://localhost/dnndev56...e/TestUser1Page.aspx UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 22173b5f-4894-41ee-a466-93a0b2d0e897
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: Bring2mind.DNN.Modules.DMX.Common.Settings.ModuleSettings..ctor
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Bring2mind.DNN.Modules.DMX.Common.Settings.ModuleSettings..ctor(Int32 ModuleId) at Bring2mind.DNN.Modules.DMX.Common.Settings.ModuleSettings.GetModuleSettings(Int32 ModuleId) at Bring2mind.DNN.Modules.DMX.Common.Settings.Settings..ctor(Int32 PortalId, Int32 ModuleId) at Bring2mind.DNN.Modules.DMX.Framework.ModuleBase.get_Settings() at Bring2mind.DNN.Modules.DMX.Controls.EditCategories.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at Bring2mind.DNN.Modules.DMX.Controls.EditCategories.DataBind() at Bring2mind.DNN.Modules.DMX.Controls.EditEntryPB.ᜂ() at Bring2mind.DNN.Modules.DMX.Controls.EditEntryPB.ᜄ(Object A_0, EventArgs A_1) --- End of inner exception stack trace ---
Source:
Server Name: XXXXXXX