In previous versions of DNN (< 5.2.2), as a developer, we were able to register new modules into DNN without using the a manifest file. Now the new Create New Module function in DNN 5.2.3 cannot handle the situation where you are registering additional modules into the same package location as it gives duplicate record errors (see below).
Let me explain our situation so it is a little clearer.... We are constantly developing new controls (modules) for our complex corporate application which has dozens of controls we use which are all stored in the same DesktopModules\OurApp subfolder. As we need new functionality, we create a new control (xyz.asc and xyz.ascx.vb), upload it to our server, register it as a new module, then use it on pages as we see fit. Well that was before DNN 5.2.1 'ish. Now that DNN have radically changed the Create Module interface, we no longer seem to be able to just "register" a new module to an existing package or DesktopModules location. If you try to add using "Create New Module", Create Module From: Control, leave Owner Folder on <Not Specified>, select our folder under DesktopModule for the Module Folder, then select our newly uploaded xyz.asx file, give it a name, then click Create Module, we get the following error message:-
System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_DesktopModules_ModuleName'. Cannot insert duplicate key in object 'dbo.DesktopModules'. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Data.SqlDataProvider.AddDesktopModule(Int32 packageID, String ModuleName, String FolderName, String FriendlyName, String Description, String Version, Boolean IsPremium, Boolean IsAdmin, String BusinessControllerClass, Int32 SupportedFeatures, String CompatibleVersions, String Dependencies, String Permissions, Int32 createdByUserID) at DotNetNuke.Entities.Modules.DesktopModuleController.SaveDesktopModule(DesktopModuleInfo desktopModule, Boolean saveChildren, Boolean clearCache) at DotNetNuke.Entities.Modules.DesktopModuleController.AddDesktopModule(DesktopModuleInfo objDesktopModule) at DotNetNuke.Modules.Admin.ModuleDefinitions.CreateModuleDefinition.ImportControl(String controlSrc)
Does anyone know any way of just registering a new module to an existing DesktopModules folder, similar to what we could do before?
Or are we forever stuck with having to create a manifest file, just to register a new control?