I created a Parent Portal on a DNN installation, via Host -> Host Management, containing a single initial (pre-existing) portal with no other pre-existing portals (parent or children), since the initial DNN version installation (v.7.0.1).
The site now runs under I'm running DNN 7.3.2
I pre-created on my Plesk hosting provider system a sub-domain with sub folder (not domain with physical hosting).
I let DNN create the parent portal. It has successfully created it.
After some hours only I decided to delete it cause I made a mistake on the Site Alias.
I got the following message (pasting it from my Event Viewer):
My log reads:
ModuleId:321
ModuleDefId:63
FriendlyName:Site Management
ModuleControlSource:DesktopModules/Admin/Portals/Portals.ascx
AssemblyVersion:7.3.3
PortalID:0
PortalName:InteliBrain™
UserID:3
UserName:InteliBrainGRSuperUser
ActiveTabID:17
ActiveTabName:Site Management
RawURL:/en-us/Host/Site-Management/portalid/0
AbsoluteURL:/Default.aspx
AbsoluteURLReferrer:http://intelibrain.gr/en-us/Host/Site-Management/portalid/0
UserAgent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:ebbf7f97-324e-4347-9c08-d0feac27b519
InnerException:The DELETE statement conflicted with the REFERENCE constraint "FK_FolderPermission_Roles". The conflict occurred in database "InteliBrainGR", table "dbo.FolderPermission", column 'RoleID'. The statement has been terminated.
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:System.Data.SqlClient.SqlConnection.
StackTrace:
Message:
DotNetNuke.Services.Exceptions.ModuleLoadException: The DELETE statement conflicted with the REFERENCE constraint "FK_FolderPermission_Roles". The conflict occurred in database "InteliBrainGR", table "dbo.FolderPermission", column 'RoleID'.
The statement has been terminated. ---> System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_FolderPermission_Roles". The conflict occurred in database "InteliBrainGR", table "dbo.FolderPermission", column 'RoleID'.
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()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
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.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at PetaPoco.Database.Execute(String sql, Object[] args)
at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteNonQuery(String connectionString, CommandType type, Int32 timeout, String sql, Object[] args)
at DotNetNuke.Data.SqlDataProvider.ExecuteNonQuery(String procedureName, Object[] commandParameters)
at DotNetNuke.Data.DataProvider.DeletePortalInfo(Int32 PortalId)
at DotNetNuke.Entities.Portals.PortalController.DeletePortalInternal(Int32 portalId)
at DotNetNuke.Entities.Portals.PortalController.DeletePortal(PortalInfo portal, String serverPath)
at DotNetNuke.Modules.Admin.Portals.Portals.OnGridDeleteCommand(Object source, GridCommandEventArgs e)
--- End of inner exception stack trace ---
Searching the issue both here on Community, I'm pasting the relevant links:
http://www.dnnsoftware.com/forums/for...
http://www.dnnsoftware.com/forums/for...
http://www.dnnsoftware.com/forums/for...
and from dnntracker.atlassian.net I'm pasting the relevant links:
https://dnntracker.atlassian.net/brow...
https://dnntracker.atlassian.net/brow...
https://dnntracker.atlassian.net/brow...
I noticed that the issue is very old, open since 2004 (!) and still unresolved and seems that it has to so with DeletePortalInfo that does not delete all elements w/o FK, although tracked on dnntracker.atlassian.net, no action has been taken to be resolved.
Since, a quick resolvement does not seem to be expected soon, I want to ask if there any super safe way to do the deletions manually.
I read that cascading deletions are needed on relevant tables ...
Any support will be greatly appreciated.