Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Cannor add/delete a portalCannor add/delete a portal
Previous
 
Next
New Post
9/10/2015 7:34 PM
 

Hi There,

After downgrading from 7.3.1 PE to 7.3.1 CE and then upgrading to 7.4.1 CE, i am experiencing issues with adding and deleting a portal. I will be grateful for any help from the community, it was working on 7.3.1 CE. Below is the error log:

Error: Site Management is currently unavailable.DotNetNuke.Services.Exceptions.ModuleLoadException: The DELETE statement conflicted with the REFERENCE constraint "FK_Files_Portals". The conflict occurred in database "mydatabase", table "dbo.Files", column 'PortalId'. The statement has been terminated. ---> System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_Files_Portals". The conflict occurred in database "mydatabase", table "dbo.Files", column 'PortalId'. The statement has been terminated. at System.Data.SqlClient.SqlConnection. (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, String sql, Object[] args) 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 ---

Kind Regards,
Vishal

 
New Post
9/11/2015 4:02 AM
 
this is not an area, which is touched by DNN PE, AFAIK.
I would suspect it is an oversight in the DeletePortal stored procedure to delete portal files first.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/13/2015 4:43 PM
 

Hi Sabastien,

Thanks for your response. How do i investigate this?

Regards,

Vishal

 
New Post
9/14/2015 2:30 AM
 
in SQL Server Management Studio, right click the stored procedure and choose "edit definition".
Check whether there is a statement "DELETE FROM dbo.Files WHERE PortalID = @PortalID;".
If not, add it before the like "DELETE FORM dbo.Portals WHERE PortalID = @PortalID;".

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/16/2015 1:01 AM
 

Hi Sebastian,

I looked under Databases>mydatabase>Programmability>Stored Procedures>dbo.DeleteFiles . Is this the right stored procedure i'm looking at? Script Below:

USE [mydatabase]

GO

/****** Object:  StoredProcedure [dbo].[DeleteFiles]    Script Date: 09/16/2015 16:58:04 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

 

ALTER PROCEDURE [dbo].[DeleteFiles]

    @PortalID int

AS

BEGIN

    IF @PortalID is null

    BEGIN

        DELETE FROM dbo.Files WHERE PortalId is null

    END ELSE BEGIN

        DELETE FROM dbo.Files WHERE PortalId = @PortalID

    END

 

END

 

Kind Regards,

Vishal

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Cannor add/delete a portalCannor add/delete a 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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out