Hi, today I've made some changes in Kentico's database structure:
Also, I had defined OnAfterInsertDocument event, where I used DocumentHelper.UpdateDocument. In this place after inserting document, exception occurs. Please see stack. I know, that column is truncated but I don't know which and why. Maybe it is because I didn't change CMSMaxNodeAliasLength?
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.GeneralConnection.RunQuery(QueryParameters query) at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query) at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query, Int32& totalRecords) at CMS.DataEngine.DataQueryBase`1.GetDataFromDB() at CMS.DataEngine.DataQueryBase`1.GetData() at CMS.DataEngine.DataQueryBase`1.Execute() at CMS.DataEngine.AbstractInfo`1.UpdateData() at CMS.DataEngine.AbstractInfoProvider`2.SetInfo(TInfo info) at CMS.DocumentEngine.TreeNode.UpdateCultureData() at CMS.DocumentEngine.TreeNode.UpdateInternal() at CMS.DocumentEngine.TreeNode.Update(Boolean useDocumentHelper) at CMS.DocumentEngine.VersionManager.SaveVersionInternal(TreeNode node, String versionNumber, String versionComment, String updateColumns, WorkflowInfo forceWorkflow) 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 System.EventHandler`1.Invoke(Object sender, TEventArgs e) at CMS.FormControls.CMSAbstractManager`2.RaiseSaveData(EventArgsType args) at CMS.FormControls.CMSDocumentManager.SaveDocumentInternal(String actionContext) Message: String or binary data would be truncated. The statement has been terminated.
Thank you for any help.
Where did you make the modifications, directly in the database? If so, there is most likely a conflict with the actual database schema and the schema which is stored within the cms_class table.
Hi, Yes, I updated database directly. So where should I also do it?
I see that for example cms.document in cms_class table has wrong DocumentName column size - that needs to be updates too. Is there any UI in Kentico helps to update this xml?
If you're using v8, you can make changes within the Modules>module name>Classes. The Classes are where your database schema are defined and updated.
I checked: Modules > Pages > Page (Class), then I tried to update Document name, but this field is locked to edit and whole this table "Is customizable" has set to false.
I'm using Kentico v8
Hello All,
I'm also facing same issue and not able to edit field size of "VersionDocumentName" in CMS_VersionHistory table. It's always read only for me. Please give me some solution for this.
Thanks
Binod Paikaray
Please, sign in to be able to submit a new answer.