categories upgrade
Last Post 2/17/2011 10:19 PM by Patty. 3 Replies.
Author Messages
Patty
New Member
New Member
Posts:3
Avatar

--
2/16/2011 05:38 PM
    Hi,,, upgraded my back end on my portal from 4.6 to 5.5.1. Trying to upgrade the categories module, but am getting errors. I have upgraded the core Store module to 2.1.36.

    I am trying to upgrade the categories module to 3.2.1 and am getting the following errors. The articles upgrade worked just fine. Thanks for any insight.

    ERROR 1:
    Start Sql execution: 03.02.00.SqlDataProvider file
    Warning SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Column names in each table must be unique. Column name 'ParentCategoryId' in table 'dbo.Categories' is specified more than once. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER TABLE dbo.Categories ADD ParentCategoryId int NULL System.Data.SqlClient.SqlException: Column names in each table must be unique. Column name 'Abbreviation' in table 'dbo.Categories' is specified more than once. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER TABLE dbo.Categories ADD Abbreviation nvarchar(20) System.Data.SqlClient.SqlException: Column names in each table must be unique. Column name 'IconFile' in table 'dbo.Categories' is specified more than once. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER TABLE dbo.Categories ADD IconFile nvarchar(100) System.Data.SqlClient.SqlException: Column names in each table must be unique. Column name 'Level' in table 'dbo.Categories' is specified more than once. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER TABLE dbo.Categories ADD Level int NOT NULL DEFAULT 1
    Info End Sql execution: 03.02.00.SqlDataProvider file


    ERROR 2
    Starting Installation - Module
    Failure ExceptionSystem.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_ModuleDefinitions'. Cannot insert duplicate key in object 'dbo.ModuleDefinitions'. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() 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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Data.SqlDataProvider.AddModuleDefinition(Int32 DesktopModuleId, String FriendlyName, Int32 DefaultCacheTime, Int32 createdByUserID) at DotNetNuke.Entities.Modules.Definitions.ModuleDefinitionController.SaveModuleDefinition(ModuleDefinitionInfo moduleDefinition, Boolean saveChildren, Boolean clearCache) at DotNetNuke.Entities.Modules.DesktopModuleController.SaveDesktopModule(DesktopModuleInfo desktopModule, Boolean saveChildren, Boolean clearCache) at DotNetNuke.Services.Installer.Installers.ModuleInstaller.Install()
    Failure Installation Failed - Module
    Patty
    New Member
    New Member
    Posts:3
    Avatar

    --
    2/17/2011 09:18 PM
    So,,, I figured out how to get around the issue of duplicate field names (the first install error) BUT I am unable to upgrade the categories to v 3.2.1 as I was getting the dreaded duplicate entry error.

    The Articles has been updated to v 4.2.6, but the only Category I can get working is the ALt friendly name version 3.1.

    That installed just fine, but now all of my article modules that worked before are now throwing the following errors. Anyone know of anything I can do to get this back working? it's the last thing I need to fix to get my site up again. Is there a friendly name version of the 3.2.1 version that will work?????

    I sure hate to have to not use this great module as it does exactly what I need it to do!!!

    ************************

    Error retrieving the article list:
    DotNetNuke.Services.Exceptions.ModuleLoadException: Parameter count does not match Parameter Value count. ---> System.ArgumentException: Parameter count does not match Parameter Value count. at Microsoft.ApplicationBlocks.Data.SqlHelper.AssignParameterValues(SqlParameter[] commandParameters, Object[] parameterValues) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) at EfficionConsulting.Articles.ArticleController.GetArticles(Int32 PortalId, Int32 ModuleId, String Categories, Int32 MaxNumber, Int32 Age, Boolean ShowAuthOnly, Boolean Featured, Boolean IgnorePublishDate, Boolean IgnoreExpired, String SortField) at EfficionConsulting.Articles.ArticleListBase.GetData() --- End of inner exception stack trace ---

    --------------------------------------------------------------------------------
    Error Loading the Article List:
    DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at EfficionConsulting.Articles.ArticleListBase.GetDataPage() at EfficionConsulting.Articles.ArticleListBase.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---
    David O'Leary
    Efficion Consulting Staff
    Basic Member
    Basic Member
    Posts:151
    Avatar

    --
    2/17/2011 09:37 PM
    Well there's a problem I hadn't thought about in a LONG time. I've put an updated version of the Categories module with the Alternate Friendly name up. Please let me know if this doesn't resolve your problem.
    Patty
    New Member
    New Member
    Posts:3
    Avatar

    --
    2/17/2011 10:19 PM
    Hi David,,,
    in desperation, I went into the database did the following to get things to work,,, not sure how much I have orphaned, but here is what I had to do in order to get the current categories to update (the version without the friendly name change)

    Open the dbo.categories table
    Delete all columns except for CategoryID, PortalID, and CategoryName

    Open the dbo.ModuleDefinitions table
    Rename the store categories friendly name to Categories 1
    Rename the Articles Categories (had to use the old friendly name install before this upgrade) and rename it to Categories

    run the install.

    It's been a long 24 hours to get this to work but all my instances on my site appear to be displaying now. Haven't tried to add anything yet,,,


    ---