微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

c# – Sitecore 8(修订版150121),分析(MongoDB),错误“位置0没有行”

你好.我在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)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐