Skip to content

[Bug]: Script Error On Upgrade to 10.x #6480

@mitchelsellers

Description

@mitchelsellers

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

In testing the latest RC when upgrading an installation with certain configuration details, the HTML module was not able to install correctly due to two issues identified in the SQLDataProvider

  1. An incorrect syntax issue on a FK that was created
  2. An issue with a FK, that is not on all prior DNN installations, that prevented the removal of a table

I have a tested fix that I will be submitting for this that has been used successfully with multiple upgrades to the latest RC with the fix.

Steps to reproduce?

1, Have an older installation of DNN Platform
2. Upgrade to the latest RC of 10
3. See an install issue with the HTML module

Current Behavior

HTML Module fails, causing the install itself to stop and requiring manual intervention

Expected Behavior

Successful upgrade

Relevant log output

For the incorrect syntax one here is the error

`
System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near '.'.
   at System.Data.SqlClient.SqlConnection.OnError(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.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDatabaseConnectionProvider.ExecuteNonQuery(String connectionString, CommandType commandType, Int32 commandTimeout, String query)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script, Int32 timeoutSec)
ClientConnectionId:e0aaed7a-d6a4-4e19-88ac-94dc644f807d
Error Number:102,State:1,Class:15

IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'dbo.FK_WorkflowStates_Workflow') AND parent_object_id = OBJECT_ID(N'dbo.[WorkflowStates]'))
    ALTER TABLE dbo.[WorkflowStates] DROP CONSTRAINT dbo.FK_WorkflowStates_Workflow;
`

Anything else?

No response

Affected Versions

10.0.0 (RC)

What browsers are you seeing the problem on?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions