Kentico Site upgrade K9 to K10 error

Vangelis Kouzounis asked on February 12, 2018 16:03

How I can solve this?

EventID: 27965177

EventType: E

EventTime: 1/28/2018 3:00:58 PM

Source: BizForm

EventCode: Saving failed

UserID: 65

UserName: public

IPAddress: 10.127.224.61

EventDescription: Message:

INSERT INTO OM_Activity ([ActivityActiveContactID], [ActivityOriginalContactID], [ActivityCreated], [ActivityType], [ActivityItemID], [ActivityItemDetailID], [ActivityValue], [ActivityURL], [ActivityTitle], [ActivitySiteID], [ActivityGUID], [ActivityIPAddress], [ActivityComment], [ActivityCampaign], [ActivityURLReferrer], [ActivityCulture], [ActivityNodeID]) VALUES (@ActivityActiveContactID, @ActivityOriginalContactID, @ActivityCreated, @ActivityType, @ActivityItemID, @ActivityItemDetailID, @ActivityValue, @ActivityURL, @ActivityTitle, @ActivitySiteID, @ActivityGUID, @ActivityIPAddress, @ActivityComment, @ActivityCampaign, @ActivityURLReferrer, @ActivityCulture, @ActivityNodeID);

SELECT SCOPE_IDENTITY() AS [ID]

Caused exception: Invalid column name 'ActivityActiveContactID'. Invalid column name 'ActivityOriginalContactID'. Invalid column name 'ActivityGUID'.

Exception type: System.Exception Stack trace: at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, Exception ex) at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) at CMS.DataEngine.AbstractDataConnection.CMS.DataEngine.IDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) at CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query) at CMS.DataEngine.GeneralConnection.RunQueryWithRetry(QueryParameters query, Int32 retryCount) at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query) at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query, Int32& totalRecords) at CMS.DataEngine.DataQueryBase1.GetDataFromDBInternal() at CMS.DataEngine.DataQueryBase1.GetDataFromDB() at CMS.DataEngine.DataQueryBase1.GetData() at CMS.DataEngine.SimpleDataClass.Insert(Boolean initId) at CMS.DataEngine.AbstractInfoBase1.InsertDataInternal() at CMS.DataEngine.AbstractInfoBase1.InsertData() at CMS.DataEngine.AbstractInfoBase1.GeneralizedInfoWrapper.InsertData() at CMS.DataEngine.AbstractInfoProvider3.SetInfo(TInfo info) at CMS.Activities.ActivityInfoProvider.SetActivityInfoInternal(ActivityInfo activityObj) at CMS.Activities.ActivityInfoProvider.SetActivityInfo(ActivityInfo activityObj) at CMSModuleLoader.ITTLoaderModuleAttribute.AddContactActivityFormSubmitted(ContactInfo contact, String activityName, String formName, BizFormItem bizItem) in d:\Sites\upgrade\ittcannon.com\CMS\App_Code\ITT\ITTLoaderModule.cs:line 1018 at CMSModuleLoader.ITTLoaderModuleAttribute.AddContactAndGroupAndFormSubmit(ObjectEventArgs e, Boolean LogSubmitEvent) in d:\Sites\upgrade\ittcannon.com\CMS\App_Code\ITT\ITTLoaderModule.cs:line 498 at CMSModuleLoader.ITTLoaderModuleAttribute.ObjectInsertAfter(Object sender, ObjectEventArgs e) in d:\Sites\upgrade\ittcannon.com\CMS\App_Code\ITT\ITTLoaderModule.cs:line 693 at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler1 h, TArgs e) at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List1 list, TArgs e, Boolean important) at CMS.Base.AdvancedHandler2.RaiseAfter(TArgs e) at CMS.Base.AdvancedHandler2.RaiseAfter(TArgs e) at CMS.Base.AdvancedHandler2.RaiseAfter(TArgs e) at CMS.Base.AdvancedHandler2.Finish() at CMS.DataEngine.AbstractInfoBase1.InsertData() at CMS.OnlineForms.BizFormItem.InsertData() at CMS.DataEngine.AbstractInfoBase1.GeneralizedInfoWrapper.InsertData() at CMS.DataEngine.AbstractInfoProvider3.SetInfo(TInfo info) at CMS.OnlineForms.BizFormItemProvider.SetItemInternal(BizFormItem item) at CMS.OnlineForms.BizFormItemProvider.SetItem(BizFormItem item) at CMS.OnlineForms.BizFormItem.SetObject() at CMS.DataEngine.BaseInfo.Insert() at CMS.OnlineForms.Web.UI.BizForm.SaveDataInternal()

Message: Invalid column name 'ActivityActiveContactID'. Invalid column name 'ActivityOriginalContactID'. Invalid column name 'ActivityGUID'.

Exception type: System.Data.SqlClient.SqlException Stack trace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.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.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

EventUrl: /product-rfq-bizform/?link=http%3a%2f%2fk10.ittcannon.com%2fProducts%2fNemesis-II-CBA-Connector%2f%3faliaspath%3d%252fProducts%252fNemesis-II-CBA-Connector

EventMachineName: USANR1CMSDWB01

EventUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Correct Answer

Juraj Ondrus answered on February 14, 2018 08:39

Vangelis contacted our support and it turned out the XML definitions for the CMS.Activity class in CMS_Class table were not correctly updated for some reason. We replaced them with default values from Kentico 10. However it indicates something went wrong during the upgrade and the recommended solution is restoring backups back to v9 and running the manual upgrade steps.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on February 12, 2018 18:13

In Kentico 10 these fields were renamed (ActivityActiveContactID to ActivityContactID),

i would check to see if you have some custom logic that is trying to reference these, if you have Visual Studio search the entire solution for "ActivityActiveContactID" and see where it's referenced. The upgrade didn't show any errors, right?

1 votesVote for this answer Mark as a Correct answer

Vangelis Kouzounis answered on February 13, 2018 10:38

Thank you Trevor for your answer.

I searched solution in Visual Studio,no matching entry. It seems to me that is somewhere into DB. I will be grateful if you can point me in the right direction.

Many thanks for considering my request

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on February 13, 2018 14:25

Okay then next step is to query the cms_query table where querytext like "%ActivityActiveContactID%"

Also check your stored procedure on the database for any reference to this.

This will show if there are any custom or site queries that are referencing it that may be called in code. If you find it, changed the column reference to the new column name.

If after all that and still nothing, then one of Kentico's class libraries didn't upgrade properly because the reference would then be there.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.