
你好。我在Sitecore 8分析器中的问题--当我在一个“体验配置文件”中查看非非独立用户的选项卡‘配置文件’和‘概述’时,错误‘在0位置没有行’。
此错误也存在于Sitecore 8的更新中。是什么导致了此错误?
发布于 2015-03-13 13:40:29
因此,这个问题是由开发人员的错误调用的。
在分析了"FindBestPatternMatchAndApplyToProfileInfo“类的代码及其方法之后,我可以从元素中找到空数组(属性"Rows”中的"dataTable“对象)。这会导致范围之外的异常。
通过添加"if"-statement来检查“行”字段,可以通过实现自己的类(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营销控制面板中添加相应的配置文件。(https://developers.coveo.com/display/public/SC201503/Understanding+Profiles+and+Pattern+Cards;jsessionid=D03AC5B4F9F4B4E588538BC977BE2F6D)
https://stackoverflow.com/questions/28783328
复制相似问题