Kentico 8 : Can't not save document name

Bui Tuong asked on July 15, 2014 06:35

Hi guys. I have a issue about save document name. I'm using K8 and when i edit a document name then i see the error. After, I see event log and this detail event log.


An error occurred when saving data. Please see event log for more details. Message:

Proc_CMS_Document_UpdateDocumentNamePath

Caused exception: Procedure or function Proc_CMS_Document_UpdateDocumentNamePath has too many arguments specified.

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.ExecuteQueryInternal(QueryParameters query) at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters parameters) at CMS.DataEngine.GeneralConnection.ExecuteQuery(String queryName, QueryDataParameters parameters, QueryMacros macros) at CMS.DataEngine.GeneralConnection.ExecuteQuery(String queryName, QueryDataParameters parameters, QueryMacros macros, Int32 offset, Int32 maxRecords, Int32& totalRecords) at CMS.DataEngine.DataQueryBase1.GetDataFromDB() at CMS.DataEngine.DataQueryBase1.GetData() at CMS.DataEngine.DataQueryBase1.get_Result() at CMS.DataEngine.ConnectionHelper.ExecuteQuery(String queryName, QueryDataParameters parameters, String where, String orderBy, Int32 topN, String columns, Int32 offset, Int32 maxRecords, Int32& totalRecords) at CMS.DocumentEngine.TreeNode.UpdatePaths(String siteName, Int32 sourceNodeId, Boolean documentPath) at CMS.DocumentEngine.TreeNode.UpdateInternal() at CMS.DocumentEngine.TreeNode.Update(Boolean useDocumentHelper) at CMS.DocumentEngine.DocumentHelper.UpdateDocument(TreeNode node, TreeProvider tree, String updateColumns) at CMS.DocumentEngine.TreeNode.Update(Boolean useDocumentHelper) at CMS.FormControls.CMSDocumentManager.UpdateDocumentInternal(Boolean useDocumentHelper) at CMS.FormControls.CMSDocumentManager.UpdateDocument(Boolean useDocumentHelper) at CMS.FormControls.CMSForm.SaveDataInternal() at CMS.FormControls.BasicForm.SaveData(String redirectUrlAfterSave, Boolean showChangesSaved) at CMS.FormControls.CMSForm.DocumentManager_OnSaveData(Object sender, DocumentManagerEventArgs e) at CMS.FormControls.CMSAbstractManager2.RaiseSaveData(EventArgsType args) at CMS.FormControls.CMSDocumentManager.SaveDocumentInternal(String actionContext)

Message: Procedure or function Proc_CMS_Document_UpdateDocumentNamePath has too many arguments specified.

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) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) 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)

I try reseach but i can't find any answers to resolve problem. Please help! Thanks!

Correct Answer

Martin Danko answered on July 15, 2014 10:32

Hello Bui,

this seems to be related the bug found in Kentico 8.

Please apply the latest hotfix for Kentico 8 as first: Upgrading and hotfixing an instance in KIM

Best regards, Martin

0 votesVote for this answer Unmark Correct answer

Recent Answers


Bui Tuong answered on July 15, 2014 12:35

Hi Martin. Thanks you very much. My problem was resolved.

Regard!

0 votesVote for this answer Mark as a Correct answer

Simon Lukell answered on October 20, 2014 06:33

I'm getting the same error with Version 7 the LATEST hotfix 7.0.103. Could you please help me with this?

Event Log is: An error occurred during the document action. Please see event log for more details.Message: [DataConnection.HandleError]: Query: Proc_CMS_Document_UpdateDocumentNamePath: caused exception: Procedure or function Proc_CMS_Document_UpdateDocumentNamePath has too many arguments specified. Stack Trace: at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, SqlException ex)at CMS.DataProviderSQL.DataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

The SP execution is exec Proc_CMS_Document_UpdateDocumentNamePath @StartingAliasPath=N'/XXX/XXX/XXX/XXX/XX',@NodeLevel=6,@SiteID=1,@DefaultCultureCode=N'en-AU',@GenerateAliases=1

0 votesVote for this answer Mark as a Correct answer

Simon Lukell answered on October 20, 2014 06:37

Just as additional information.

The Store Procedure in my database has different parameters than the ones I mentioned in my previous post:

[dbo].[Proc_CMS_Document_UpdateDocumentNamePath] @OriginalNodeID int, @SiteID int, @DefaultCultureCode nvarchar(10)

It seems there is a missing script to execute in the hotfix installation

Could you please provide a solution?

0 votesVote for this answer Mark as a Correct answer

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