从ver7成功升级到ver8后,只能看到显示以下错误的实际站点的管理员屏幕:
' /'中的服务器错误应用
从字符串转换为时转换失败 唯一标识符
描述:执行期间发生了未处理的异常 当前的网络请求。请查看堆栈跟踪了解更多信息 有关错误的信息以及它在代码中的起源。
异常详细信息:System.Data.SqlClient.SqlException:Conversion 从字符串转换为uniqueidentifier时失败。
来源错误:
执行期间生成了未处理的异常 当前的网络请求。有关的来源和位置的信息 可以使用下面的异常堆栈跟踪来识别异常。
堆栈追踪:
[SqlException(0x80131904):从a转换时转换失败 字符串到uniqueidentifier。]
System.Data.SqlClient.SqlConnection.OnError(SqlException异常, Boolean breakConnection,Action`1 wrapCloseInAction)+3189408
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj,Boolean callerHasConnectionLock,Boolean asyncClose)+753
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler,SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj,布尔& dataReady)+5042
System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) +278 System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout,Boolean& more)+295
System.Data.SqlClient.SqlDataReader.Read()+42
System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +157 System.Data.Common.DataAdapter.FillFromReader(DataSet数据集,DataTable数据表,String srcTable,DataReaderContainer dataReader, Int32 startRecord,Int32 maxRecords,DataColumn parentChapterColumn, Object parentChapterValue)+225
System.Data.Common.DataAdapter.Fill(DataSet dataSet,String srcTable, IDataReader dataReader,Int32 startRecord,Int32 maxRecords)+479
System.Data.Common.DbDataAdapter.FillInternal(DataSet数据集, DataTable [] datatables,Int32 startRecord,Int32 maxRecords,String srcTable,IDbCommand命令,CommandBehavior行为)+277
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet,Int32 startRecord,Int32 maxRecords,String srcTable,IDbCommand命令, CommandBehavior行为)+178
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)+122
CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams,QueryTypeEnum queryType,Boolean requiresTransaction)+251[例外:[DataConnection.HandleError]:
查询:SELECT * FROM( SELECT [PageID],[MenuItemName],[MenuItemTeaserImage],[概要],[PermanentExhibition],[WheelchairAccessible],NULL AS [HomeID],NULL AS [MenuItemGroup],ClassName,DocumentCulture, DocumentGUID,DocumentModifiedWhen,DocumentMenuCaption, DocumentMenuClass,DocumentMenuClassHighLighted, DocumentMenuClassOver,DocumentShowInSiteMap, DocumentMenuItemHideInNavigation,DocumentMenuItemImage, DocumentMenuItemImageHighlighted,DocumentMenuItemImageOver, DocumentMenuItemInactive,DocumentMenuItemLeftImage, DocumentMenuItemLeftImageHighlighted,DocumentMenuItemLeftImageOver, DocumentMenuItemRightImage,DocumentMenuItemRightImageHighlighted, DocumentMenuItemRightImageOver,DocumentMenuJavascript, DocumentMenuRedirectUrl,DocumentMenuRedirectToFirstChild, DocumentMenuStyle,DocumentMenuStyleHighlighted, DocumentMenuStyleOver,DocumentName,DocumentUrlPath,NodeAliasPath, NodeID,NodeChildNodesCount,NodeClassID,NodeLevel,NodeLinkedNodeID, NodeParentID,SiteName,NodeACLID,NodeSiteID,NodeOwner,NodeOrder, NodeName,DocumentSitemapSettings,NodeOrder AS CMS_O1,ROW_NUMBER() OVER(ORDER BY DocumentName)AS CMS_SRN,0 AS CMS_SN, '的 cms.document.nmi.page ' AS CMS_T FROM View_NMI_Page_Joined WHERE NodeSiteID = @NodeSiteID AND(DocumentMenuItemHideInNavigation = 0) AND(已发布= @Published AND NodeLevel< = @NodeLevel AND DocumentCulture = @DocumentCulture)UNION ALL SELECT NULL AS [PageID],[MenuItemName],[MenuItemTeaserImage],NULL AS [概要], NULL AS [PermanentExhibition],NULL AS [WheelchairAccessible], [HomeID],[MenuItemGroup],ClassName,DocumentCulture,DocumentGUID, DocumentModifiedWhen,DocumentMenuCaption,DocumentMenuClass, DocumentMenuClassHighLighted,DocumentMenuClassOver, DocumentShowInSiteMap,DocumentMenuItemHideInNavigation, DocumentMenuItemImage,DocumentMenuItemImageHighlighted, DocumentMenuItemImageOver,DocumentMenuItemInactive, DocumentMenuItemLeftImage,DocumentMenuItemLeftImageHighlighted, DocumentMenuItemLeftImageOver,DocumentMenuItemRightImage, DocumentMenuItemRightImageHighlighted,DocumentMenuItemRightImageOver, DocumentMenuJavascript,DocumentMenuRedirectUrl, DocumentMenuRedirectToFirstChild,DocumentMenuStyle, DocumentMenuStyleHighlighted,DocumentMenuStyleOver,DocumentName, DocumentUrlPath,NodeAliasPath,NodeID,NodeChildNodesCount, NodeClassID,NodeLevel,NodeLinkedNodeID,NodeParentID,SiteName, NodeACLID,NodeSiteID,NodeOwner,NodeOrder,NodeName, DocumentSitemapSettings,NodeOrder AS CMS_O1,ROW_NUMBER()OVER(订单) BY DocumentName)AS CMS_SRN,1 AS CMS_SN,' cms.document.nmi.home '如 CMS_T FROM View_NMI_Home_Joined WHERE NodeSiteID = @NodeSiteID AND (DocumentMenuItemHideInNavigation = 0)AND(已发布= @Published AND NodeLevel< = @NodeLevel和DocumentCulture = @DocumentCulture))AS 子数据ORDER BY CMS_O1,CMS_SRN,CMS_SN
引发异常:从字符转换时转换失败 字符串到uniqueidentifier。 ]
CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, 例外情况ex)+282
CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams,QueryTypeEnum queryType,Boolean requiresTransaction)+342
CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query)+384 CMS.DataEngine.GeneralConnection.ExecuteQueryInternal(QueryParameters 查询)+458 CMS.DataEngine.DataQueryBase1.GetDataFromDB() +149
1.GetData()+120
CMS.DataEngine.DataQueryBase
CMS.DataEngine.DataQueryBase1.get_Result() +106
3.GetResults(IDataQuery 查询,Int32& totalRecords)+54
CMS.DocumentEngine.DocumentQueryProperties.FilterResultsByPermissions(IDataQuery query, Int32& totalRecords) +2128
CMS.DocumentEngine.MultiDocumentQueryBase
CMS.DataEngine.MultiQueryBase2.GetDataFromDB() +60
1.GetData()+120
CMS.DataEngine.DataQueryBase
CMS.DataEngine.DataQueryBase`1.get_Result()+106
CMS.Controls.CMSAbstractMenuProperties.GetMenuItems(字符串 resolvedPath,Boolean siteMap)+910
CMS.Controls.CMSAbstractMenuProperties.GetDataSource(Boolean siteMap) +839 CMS.Controls.CMSListMenu.ReloadData(Boolean forceLoad)+202 CMS.Controls.CMSListMenu.InitControl(Boolean loadPhase)+162
CMS.Controls.CMSListMenu.OnLoad(EventArgs e)+500
System.Web.UI.Control.LoadRecursive()+68
System.Web.UI.Control.LoadRecursive()+162
System.Web.UI.Control.LoadRecursive()+162
System.Web.UI.Control.LoadRecursive()+162
System.Web.UI.Control.LoadRecursive()+162
System.Web.UI.Control.LoadRecursive()+162
System.Web.UI.Control.LoadRecursive()+162
System.Web.UI.Control.LoadRecursive()+162
System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint) 3811版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.7.2106.0
我将提出错误的表与我从cms.document.nmi.page继承的文档类型cms.document.nmi.home和冲突的数据类型' MenuItemTeaserImage'进行了比较。并看到以下内容:
kentico admin中相同数据类型的字段类型如下:
如何解决此错误? THX
答案 0 :(得分:1)
您是否确保在代码升级后运行SQL脚本(如果您已手动完成升级)?
https://docs.kentico.com/k8/installation/upgrading-kentico-7-to-8/upgrading-kentico-manually
您是否直接升级到Kentico 8.2?或者这是8.0版本?如果确实如此,您确保在每次升级之间都启动了站点?这将确保处理所有数据库更新
答案 1 :(得分:1)
问题原因是自定义网页类型 NMI_Page ,其中包含 MenuItemTeaserImage 列。此列与不同页面类型中的MenuItemTeaserImage列具有完全相同的名称,但名称不同,从而导致冲突。
不建议在不同的页面类型中使用相同的字段名称,因此我使用页面类型名称作为字段名称的前缀。
我将NMI_Page文档类型中的MenuItemTeaserImage字段重命名为 NMI_PageMenuItemTeaserImage (并在所有转换中也更改了此名称)。
答案 2 :(得分:0)
我的猜测是,原因可能是页面(菜单项)页面类型的更改。您在 NMI_Page 中继承了此内容,并且升级SQL可能无法有效地处理此问题。你上面所做的事情显然有效,但我很好奇你是否可以打破继承并修复你的预告片领域?