I had a well established Events module running version 5.0.3 on DNN version 5.1.4 and all was well. I upgraded DNN to 5.6.4 and now NO events show. I tried to upgrade the Events module in hopes that the events would return. The upgrade failed with the following error:
SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_ModulePermission'. Cannot insert duplicate key in object 'dbo.ModulePermission'. The statement has been terminated. at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection. (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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) /************************************************************/ /************************************************************/ /***** *****/ /***** Retain moderators as category/location editors *****/ /***** *****/ /************************************************************/ /************************************************************/ -- Ensure Moderators have edit category permissions INSERT INTO dbo.[ModulePermission] ( RoleID, ModuleID, PermissionID, AllowAccess ) SELECT MP1.RoleID, MP1.ModuleID, P3.PermissionID, - 1 AS AllowAcces FROM dbo.[ModulePermission] AS MP1 INNER JOIN dbo.[Permission] AS P1 ON MP1.PermissionID = P1.PermissionID CROSS JOIN dbo.[Permission] AS P3 WHERE (P1.PermissionCode = 'EVENTS_MODULE') AND (P1.PermissionKey = 'EVENTSMOD') AND MP1.RoleID is not null AND (MP1.RoleID NOT IN (SELECT MP2.RoleID FROM dbo.[ModulePermission] AS MP2 INNER JOIN dbo.[Permission] AS P2 ON MP2.PermissionID = P2.PermissionID INNER JOIN dbo.[Modules] AS M2 ON MP2.ModuleID = M2.ModuleID INNER JOIN dbo.[ModuleDefinitions] AS MD2 ON M2.ModuleDefID = MD2.ModuleDefID WHERE (P2.PermissionCode = 'EVENTS_MODULE') AND (P2.PermissionKey = 'EVENTSCAT') AND (MD2.FriendlyName = N'Events') AND (M2.ModuleID = MP1.ModuleID) AND MP2.RoleID is not null)) AND (P3.PermissionCode = 'EVENTS_MODULE') AND (P3.PermissionKey = 'EVENTSCAT') INSERT INTO dbo.[ModulePermission] ( UserID, ModuleID, PermissionID, AllowAccess ) SELECT MP1.UserID, MP1.ModuleID, P3.PermissionID, - 1 AS AllowAcces FROM dbo.[ModulePermission] AS MP1 INNER JOIN dbo.[Permission] AS P1 ON MP1.PermissionID = P1.PermissionID CROSS JOIN dbo.[Permission] AS P3 WHERE (P1.PermissionCode = 'EVENTS_MODULE') AND (P1.PermissionKey = 'EVENTSMOD') AND MP1.UserID is not null AND (MP1.UserID NOT IN (SELECT MP2.UserID FROM dbo.[ModulePermission] AS MP2 INNER JOIN dbo.[Permission] AS P2 ON MP2.PermissionID = P2.PermissionID INNER JOIN dbo.[Modules] AS M2 ON MP2.ModuleID = M2.ModuleID INNER JOIN dbo.[ModuleDefinitions] AS MD2 ON M2.ModuleDefID = MD2.ModuleDefID WHERE (P2.PermissionCode = 'EVENTS_MODULE') AND (P2.PermissionKey = 'EVENTSCAT') AND (MD2.FriendlyName = N'Events') AND (M2.ModuleID = MP1.ModuleID) AND MP2.UserID is not null)) AND (P3.PermissionCode = 'EVENTS_MODULE') AND (P3.PermissionKey = 'EVENTSCAT') System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_ModulePermission'. Cannot insert duplicate key in object 'dbo.ModulePermission'. The statement has been terminated. at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection. (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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) -- Ensure Moderators have edit location permissions INSERT INTO dbo.[ModulePermission] ( RoleID, ModuleID, PermissionID, AllowAccess ) SELECT MP1.RoleID, MP1.ModuleID, P3.PermissionID, - 1 AS AllowAcces FROM dbo.[ModulePermission] AS MP1 INNER JOIN dbo.[Permission] AS P1 ON MP1.PermissionID = P1.PermissionID CROSS JOIN dbo.[Permission] AS P3 WHERE (P1.PermissionCode = 'EVENTS_MODULE') AND (P1.PermissionKey = 'EVENTSMOD') AND MP1.RoleID is not null AND (MP1.RoleID NOT IN (SELECT MP2.RoleID FROM dbo.[ModulePermission] AS MP2 INNER JOIN dbo.[Permission] AS P2 ON MP2.PermissionID = P2.PermissionID INNER JOIN dbo.[Modules] AS M2 ON MP2.ModuleID = M2.ModuleID INNER JOIN dbo.[ModuleDefinitions] AS MD2 ON M2.ModuleDefID = MD2.ModuleDefID WHERE (P2.PermissionCode = 'EVENTS_MODULE') AND (P2.PermissionKey = 'EVENTSLOC') AND (MD2.FriendlyName = N'Events') AND (M2.ModuleID = MP1.ModuleID) AND MP2.RoleID is not null)) AND (P3.PermissionCode = 'EVENTS_MODULE') AND (P3.PermissionKey = 'EVENTSLOC') INSERT INTO dbo.[ModulePermission] ( UserID, ModuleID, PermissionID, AllowAccess ) SELECT MP1.UserID, MP1.ModuleID, P3.PermissionID, - 1 AS AllowAcces FROM dbo.[ModulePermission] AS MP1 INNER JOIN dbo.[Permission] AS P1 ON MP1.PermissionID = P1.PermissionID CROSS JOIN dbo.[Permission] AS P3 WHERE (P1.PermissionCode = 'EVENTS_MODULE') AND (P1.PermissionKey = 'EVENTSMOD') AND MP1.UserID is not null AND (MP1.UserID NOT IN (SELECT MP2.UserID FROM dbo.[ModulePermission] AS MP2 INNER JOIN dbo.[Permission] AS P2 ON MP2.PermissionID = P2.PermissionID INNER JOIN dbo.[Modules] AS M2 ON MP2.ModuleID = M2.ModuleID INNER JOIN dbo.[ModuleDefinitions] AS MD2 ON M2.ModuleDefID = MD2.ModuleDefID WHERE (P2.PermissionCode = 'EVENTS_MODULE') AND (P2.PermissionKey = 'EVENTSLOC') AND (MD2.FriendlyName = N'Events') AND (M2.ModuleID = MP1.ModuleID) AND MP2.UserID is not null)) AND (P3.PermissionCode = 'EVENTS_MODULE') AND (P3.PermissionKey = 'EVENTSLOC')
Can anyone help me?
|