Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Can't delete portalCan't delete portal
Previous
 
Next
New Post
12/6/2014 3:10 PM
 

I'm on the latest 7.3.4 DNN Platform. I want to delete an empty portal, no modules and the recycle bin is also empty but I get this error:

 

DotNetNuke.Services.Exceptions.ModuleLoadException: The DELETE statement conflicted with the REFERENCE constraint "FK_BizModules_UPG_AlbumModule_Modules". The conflict occurred in database "dnn", table "dbo.BizModules_UPG_AlbumModule", column 'ModuleId'.
The DELETE statement conflicted with the REFERENCE constraint "FK_ModulePermission_Roles". The conflict occurred in database "dnn", table "dbo.ModulePermission", column 'RoleID'.
The statement has been terminated.
The statement has been terminated. ---> System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_BizModules_UPG_AlbumModule_Modules". The conflict occurred in database "dnn", table "dbo.BizModules_UPG_AlbumModule", column 'ModuleId'.
The DELETE statement conflicted with the REFERENCE constraint "FK_ModulePermission_Roles". The conflict occurred in database "dnn", table "dbo.ModulePermission", column 'RoleID'.
The statement has been terminated.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   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 ---

 

 

 
New Post
12/6/2014 4:19 PM
 
OK, it turns out you MUST delete all bizmodules UMG albums BEFORE you delete your pages/modules.. restored site from backup, deleted albums, deleted site.
This is kinda silly though.. if I delete a module all that was related to it should go with it.. also sometimes you lose access to a site before you could do this if a client redirects the domain.. so I gotta let the bizmobule guys to fix this.
 
New Post
12/6/2014 8:38 PM
 

Some module providers make changes to the dnn core database structure with relation to referential integrity - as such they add additional tests to the database that can prevent things like what you are attempting.

And more problematically - when you remove a module from a page - its not the case that the underlying modules "DATA" is removed.  There is currently no internal way for dnn to force a full module cleanup of the contents of tables created by external modules.

So when you then try to delete the portal - the underlying module data still exists in the sql database - and the referential integrity checking on that data - usually something like an enforced reference to the portalid prevents the portal from being deleted.

There has been a request floating around the dnn community for a long time for the core to expose a number of events that would allow module to better handle this sort of thing.

Of these the most useful would be a onModuleRemovedFromPage or recycle bin is the most requested.  Until that exists this sort of thing is likely to continue to happen.

Westa

 
New Post
7/12/2016 1:22 PM
 
Oops... what if you don't have a backup....?
It's an old website and I waited a few months before deleting it just to make sure I was not going to need it but now the backup is definitely gone.
Is there anything else I can do to solve the problem?
Plus I don't have any UMG bizmodules.. whatever they are
Help!
 
New Post
7/13/2016 5:55 PM
 
Eduardo, what is the exactly error you get (full stack trace, please)

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Can't delete portalCan't delete portal


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out