你好.我在Sitecore 8 Analytics中遇到的问题 – 它的错误’在位置0处没有行’,当我在’EXPERIANCE PROFILE’中查看不是非常用户的标签’PROFILE’和’OVERVIEW’时.Sitecore 8的更新中也存在此错误.导致此错误的原因...

你好.我在Sitecore 8 Analytics中遇到的问题 – 它的错误’在位置0处没有行’,当我在’EXPERIANCE PROFILE’中查看不是非常用户的标签’PROFILE’和’OVERVIEW’时.
Sitecore 8的更新中也存在此错误.导致此错误的原因是什么?
解决方法:
所以,这个问题是由Sitecore开发人员的错误调用的.
分析了“FindBestPatternMatchAndApplyToProfileInfo”类及其方法的代码后,我可以从元素中找到空数组(“dataTable”对象中的属性“Rows”).这导致超出范围的异常.
可以通过添加“if”-statement来检查“Rows”字段来实现您自己的类(FindBestPatternMatchAndApplyToProfileInfo的副本)来修复此问题:
private bool ApplyPatternToOneProfile(ReportProcessorArgs args, DataRow profileRow)
{
bool flag = true;
if (DataRowExtensions.Field<Guid>(profileRow, Sitecore.Cintel.Reporting.Contact.ProfileInfo.Schema.ProfileId.Name) == Guid.Empty)
flag = false;
ViewParameters retrievingBestPattern = CustomProcessorViewPatternProfile.GetParametersForRetrievingBestPattern(args, profileRow);
DataTable dataTable = CustomerIntelligenceManager.ViewProvider.GenerateContactView(retrievingBestPattern).Data.Dataset[retrievingBestPattern.ViewName];
if (dataTable.Rows != null && dataTable.Rows.Count != 0)
{
if (!this.TryFillData<Guid>(profileRow, Sitecore.Cintel.Reporting.Contact.ProfileInfo.Schema.BestMatchedPatternId, dataTable.Rows[0], Sitecore.Cintel.Reporting.Contact.ProfilePatternMatch.Schema.PatternId.Name) || !this.TryFillData<string>(profileRow, Sitecore.Cintel.Reporting.Contact.ProfileInfo.Schema.BestMatchedPatternDisplayName, dataTable.Rows[0], Sitecore.Cintel.Reporting.Contact.ProfilePatternMatch.Schema.PatternDisplayName.Name) || !this.TryFillData<double>(profileRow, Sitecore.Cintel.Reporting.Contact.ProfileInfo.Schema.BestMatchedPatternGravityShare, dataTable.Rows[0], Sitecore.Cintel.Reporting.Contact.ProfilePatternMatch.Schema.PatternGravityShare.Name))
flag = false;
}
else
{
flag = false;
}
return flag;
}
更新:
或者,您可以通过在Sitecore Marketing控制面板中添加至少一个模式卡来解决此问题,以获取相应的配置文件.(https://developers.coveo.com/display/public/SC201503/Understanding+Profiles+and+Pattern+Cards;jsessionid=D03AC5B4F9F4B4E588538BC977BE2F6D)
本文标题为:c# – Sitecore 8(修订版150121),分析(MongoDB),错误“位置0没有行”


基础教程推荐
- C#使用Newtonsoft.Json中的JObject对象 2023-06-27
- C# winform程序实现开机自启动并且识别是开机启动还是双击启动 2023-01-06
- C#多线程之Parallel类的用法 2023-05-30
- C#串口通信工具类的封装 2023-05-21
- C#设计模式之Strategy策略模式解决007大破密码危机问题示例 2022-11-14
- C#面向对象设计原则之单一职责原则 2023-05-25
- 详解C#中检查null的语法糖 2023-06-04
- c# – Windows窗体设计器 – 在类前自动添加命名空间 2023-09-19
- C#控制台程序中使用官方依赖注入的实现 2023-02-08
- c# 判断是否为空然后赋值的4种实现方法 2022-12-01