Error after saving a page in page builder

Mr Who asked on October 26, 2021 07:45

Hello,

After upgrade Kentico 13, I'm trying to save a page in page builder, but I get follow error: screenshot

Full description of error

Description:An error occurred when saving data. Please see event log for more details.
Message:
[DataConnection.HandleError]:

Query:
INSERT INTO CMS_VersionHistory ([NodeSiteID], [DocumentID], [DocumentNamePath], [NodeXML], [ModifiedByUserID], [ModifiedWhen], [VersionNumber], [VersionComment], [ToBePublished], [PublishFrom], [PublishTo], [WasPublishedFrom], [WasPublishedTo], [VersionDocumentName], [VersionDocumentType], [VersionClassID], [VersionMenuRedirectUrl], [VersionWorkflowID], [VersionWorkflowStepID], [VersionNodeAliasPath], [VersionDeletedByUserID], [VersionDeletedWhen])
VALUES (@NodeSiteID, @DocumentID, @DocumentNamePath, @NodeXML, @ModifiedByUserID, @ModifiedWhen, @VersionNumber, @VersionComment, @ToBePublished, @PublishFrom, @PublishTo, @WasPublishedFrom, @WasPublishedTo, @VersionDocumentName, @VersionDocumentType, @VersionClassID, @VersionMenuRedirectUrl, @VersionWorkflowID, @VersionWorkflowStepID, @VersionNodeAliasPath, @VersionDeletedByUserID, @VersionDeletedWhen);

SELECT SCOPE_IDENTITY() AS [ID]

Caused exception:
Invalid column name 'DocumentNamePath'.
Invalid column name 'VersionDocumentType'.
Invalid column name 'VersionMenuRedirectUrl'.


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.<>c__DisplayClass33_0.b__0()
at CMS.DataEngine.SqlExecutionHelper.ExecuteWithRetryCore[TResult](Func`1 executionFunc, Int32 retryCount, Func`2 exceptionRetryPredicate)
at CMS.DataEngine.SqlExecutionHelper.ExecuteWithDeadlockRetryInternal[TResult](Func`1 executionFunc, Int32 retryCount)
at CMS.DataEngine.SqlExecutionHelper.ExecuteWithDeadlockRetry[TResult](Func`1 executionFunc, Int32 retryCount)
at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query)
at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query, Int32& totalRecords)
at CMS.DataEngine.DataQueryBase`1.GetDataFromDBInternal()
at CMS.DataEngine.DataQueryBase`1.GetDataFromDB()
at CMS.DataEngine.DataQueryBase`1.GetData()
at CMS.DataEngine.DataQueryBase`1.Execute()
at CMS.DataEngine.DataClassDataSqlStore.Insert(IDataClass dataClass, Boolean initializeId)
at CMS.DataEngine.AbstractInfoBase`1.InsertDataInternal()
at CMS.DataEngine.AbstractInfoBase`1.InsertData()
at CMS.DataEngine.AbstractInfoBase`1.GeneralizedInfoWrapper.InsertData()
at CMS.DataEngine.AbstractInfoProvider`3.SetInfo(TInfo info)
at CMS.DataEngine.AbstractInfoProvider`2.Set(TInfo info)
at CMS.DocumentEngine.VersionManager.CheckOutInternal(TreeNode node, Boolean nodeIsPublished, Nullable`1 handleSpecialSteps)
at CMS.FormEngine.Web.UI.CMSDocumentManager.SaveDocumentInternal(String actionContext)

Message: Invalid column name 'DocumentNamePath'.
Invalid column name 'VersionDocumentType'.
Invalid column name 'VersionMenuRedirectUrl'.

Exception type: System.Data.SqlClient.SqlException
Stack trace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.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.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, Boolean shouldCacheForAlwaysEncrypted)
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)

Could you help me please, how can I fix it? Thank you

Recent Answers


Mr Who answered on October 26, 2021 11:16

Ok, I've added an absent columns to database tables, and page builder saving looks like as work. But why did this happen initially? Has anyone encountered anything like this?

0 votesVote for this answer Mark as a Correct answer

Liam Goldfinch answered on October 26, 2021 12:45 (last edited on October 26, 2021 12:47)

You shouldn't be adding those columns back on the database tables. Those columns were removed in KX13 and shouldn't be reinstated.

Did the upgrade fully complete, without errors? Did you check the event log? Check for Upgrade - Start and Upgrade - Finish, are there any errors in between?

If the upgrade was successful without errors, have you got the correct Nuget packages installed for your MVC website? Ensure you have no K12 references!

If the above are done correctly, did you remember to clear your browser cache/open in incognito after applying the upgrade? You might still be using the old JS from K12.

0 votesVote for this answer Mark as a Correct answer

Mr Who answered on October 26, 2021 12:53

Thank you for your reply! There were some mistakes, but I didn't have a copy of the logs. I installed two packages for Kentico 13 as it was written in the documentation: Kentico.Dxperience.Asp Net.Mvc 5, Kentico.Xperience.AspNet.Mvc5.Libraries. Before that, by deleting all packages related to Kentico 12. In addition, the main page on the site has stopped scrolling. Please tell me, maybe I forgot to do something else?

0 votesVote for this answer Mark as a Correct answer

Liam Goldfinch answered on October 26, 2021 13:06

I've not experienced this error before, to me it just feels like the upgrade itself hasn't been applied correctly. Maybe your CMSApp project still references old K12 dlls?

I would probably recommend doing the upgrade again and keeping an eye on the Kentico Event Log table, and see if any errors occur.

1 votesVote for this answer Mark as a Correct answer

Mr Who answered on October 26, 2021 13:26 (last edited on October 28, 2021 08:12)

I've not experienced this error before, to me it just feels like the upgrade itself hasn't been applied correctly. Maybe your CMSApp project still references old K12 dlls?

Where exactly can I see it? NuGet packages don't seem to have CMS. version 12 packages.

UPD: When I try to publish page in page builder, I get an error about missing columns in db, but in other table

UPD 2: I also noticed that all CMS packages. they have version 13.0.13.0 (in Visual Studio) and the CMS version in the admin panel is 13.0.47.36

0 votesVote for this answer Mark as a Correct answer

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