DNNCommunity / DNN.Survey

MIT License
7 stars 8 forks source link

Unable to install Release 9.1.0 #57

Closed HZass closed 1 year ago

HZass commented 3 years ago

Describe the bug

There appears to be an issue with the SQL Providers when installing a new version of this module.

Software Versions

To Reproduce

Steps to reproduce the behavior:

  1. Attempt to install module for first time in an existing installation
  2. Installation aborts with a SQL error

Expected behavior

Module should be installed ready for use on the installation

Screenshots

If applicable, add screenshots to help explain your problem.

Error log

Note: Debug DLL's Please replace the current extension DLL's with the debug DLL's (if these are available with the release) and reproduce the error with the debug DLL's before pasting the error log.

Paste the error log that is related to this issue. Install Package::DNN_Survey

Info::Starting Installation

Info::Starting Installation - DNN_Survey

Info::Starting Installation - Config

Info::Creating backup of previous version - web.config

Info::Config file updated - web.config

Info::Component installed successfully - Config

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Cleanup

Info::Component installed successfully - Cleanup

Info::Starting Installation - Script

Info::Begin Sql execution

Info::Folder Created - C:\VWC090404Edu\DesktopModules\Survey\Providers\DataProviders\SqlDataProvider

Info::Created - Providers\DataProviders\SqlDataProvider\03.01.00.SqlDataProvider

Info::Executing 03.01.00.SqlDataProvider

Info::Start Sql execution: 03.01.00.SqlDataProvider file

Info::SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException (0x80131904): Reference to database and/or server name in 'dbo.dbo.Surveys' is not supported in this version of SQL Server. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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(TaskCompletionSource1 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:e33cf65e-44e8-4841-8378-1be4f8a781f7 Error Number:40515,State:1,Class:15 create procedure dbo.GetSurvey @SurveyID int, @ModuleID int as select SurveyID, ModuleID, Question, ViewOrder, OptionType, dbo.Users.FirstName + ' ' + dbo.Users.LastName AS CreatedByUser, CreatedDate, ( select sum(Votes) from dbo.SurveyOptions where dbo.SurveyOptions.SurveyID = dbo.Surveys.SurveyID ) AS Votes from dbo.dbo.Surveys left outer join dbo.Users on dbo.Surveys.CreatedByUser = dbo.Users.UserID where SurveyID = @SurveyID and ModuleID = @ModuleID

Info::End Sql execution: 03.01.00.SqlDataProvider file

Info::Finished Sql execution

Info::Installation Failed - Script

Info::Rolling back component install - Config

Info::Config file changes rolled back - web.config

Info::Component rolled back successfully - Config

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Rolling back component install - Cleanup

Info::Component rolled back successfully - Cleanup

Info::Installation Failed - DNN_Survey

Info::Deleted temporary install folder

Info::Installation Failed

Server Name: HansPC

Additional context

Add any other context about the problem here.

MaiklT commented 3 years ago

Thank you for pointing this out.

The solution is (until I can build a new release): unzip the installation package, and open the file /Providers/DataProviders/SqlDataProvider/03.01.00.SqlDataProvider with any text editor. Change line 152 from

from   {databaseOwner}{objectQualifier}{databaseOwner}Surveys

to

 from   {databaseOwner}{objectQualifier}Surveys

Save the file, and create a new installation zip package.

Sorry for the inconveniance.

Saeedalhs commented 2 years ago

Tried to upgrade from Survey v4.70.0 to v9.1.0 and it failed. Then uninstalled the old one and reinstall the new one. it fails with the following error: No check for pre-existence of procedure: File: 09.00.00.SqlDataProvider > There is already an object named 'Surveys_CsvExport' in the database.

Dropping manually the procedure above, and restarted installation, issues the error message below: Error in sql code: File: 03.01.00.SqlDataProvider > Invalid column name 'CreatedByUser'. at create procedure dbo.GetSurveys