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 ...Unable to delete Parent PortalUnable to delete Parent Portal
Previous
 
Next
New Post
12/25/2014 8:31 AM
 

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.

 


Panagiotis Mylonas Managing Director InteliBrain http://InteliBrain.gr
 
New Post
12/30/2014 8:52 AM
 
There are a number of tables without cascading delete - and it is not supported in some situations like permissions.
I added a couple of manual delete statements to DeletePortal Stored procedure, but this fix might not yet been included with DNN.

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/30/2014 7:11 PM
 

Sebastian,

Thanks for your reply.

So, from your answer I understand that I cannot perform any manual deletions.

Please verify that.

Can I ask you why for so long time the issue has not been resolved in previous DNN versions?

And what should I do in the meanwhile (till, possibly one day the issue will be resolved and be included in a future DNN upgrade)?

Regards.


Panagiotis Mylonas Managing Director InteliBrain http://InteliBrain.gr
 
New Post
12/30/2014 7:31 PM
 
Panagiolis,
Foreign keys on permission tables have beein changed in DNN 7.1.0, which should have been followed by an improved version of DeletePortalInfo stored procedure, which seem not to be implemented properly. See my TurboScripts for an improved version. (it assumes an existing foreign key from Portals table to Folders table with cascading delete.

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/30/2014 7:57 PM
 

Sebastian,

Thanks again for your prompt reply.

Your quote: Foreign keys on permission tables have been changed in DNN 7.1.0
R: So you mean that the issue has not existed before DNN 7.1.0?


 Your quote: ....which should have been followed by an improved version of DeletePortalInfo stored procedure, which seem not to be implemented properly.

R: Can you intesify the case for resolvement on JIRA? I'm watching the issue there and your positive involvement.

Your quote: .... See my TurboScripts for an improved version. (it assumes an existing foreign key from Portals table to Folders table with cascading delete.

R: So you imply that TurboScripts will resolve the case?

In your earlier reply you quoted:

".... I added a couple of manual delete statements to DeletePortal Stored procedure, but this fix might not yet been included with DNN. ..."

Can you specifically indicate these couple of manual delete statements to DeletePortal Stored procedure of TurboScripts by providing links and specific SQL code parts in the TurboScripts within the codeplex, so I will study & evaluate them?

Regards.


Panagiotis Mylonas Managing Director InteliBrain http://InteliBrain.gr
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Unable to delete Parent PortalUnable to delete Parent 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