我们在Sitecore日志文件中看到一个问题,消息显示 - "无法将Analytics与没有定义项的数据库一起使用"。我们尚未在Sitecore环境中启用Google Analytics。有人知道这个错误吗?
以下是我从Sitecore日志文件中找到的堆栈跟踪
2764 2015:02:24 14:11:17 ERROR Application error.
Exception: System.InvalidOperationException
Message: Cannot use Analytics with a database that has no definition items
Source: Sitecore.Kernel
at Sitecore.Diagnostics.Assert.ResultNotNull[T](T result, String message)
at Sitecore.Analytics.Commons.LazyReference`1.GetValue(Object mutex, Func`1 initializer)
at Sitecore.Analytics.Data.Items.AnalyticsItems.<get_Profiles>b__7()
at Sitecore.Analytics.Commons.LazyReference`1.GetValue(Object mutex, Func`1 initializer)
at Sitecore.Analytics.Data.TrackingField.NormalizeProfiles(AnalyticsItems analytics)
at Sitecore.Analytics.Data.TrackingField.InitializeProfiles()
at Sitecore.Buckets.Pipelines.UI.DynamicFields.EngagementValue.IsLockedCheck(DynamicFieldsArgs args)
at Sitecore.Buckets.Pipelines.UI.DynamicFields.EngagementValue.Process(DynamicFieldsArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Buckets.Pipelines.UI.DynamicFields.DynamicFieldsPipeline.Run(DynamicFieldsArgs args)
at Sitecore.Buckets.Pipelines.UI.FillItem.SetItemProperties.GetValue(Item innerItem, SitecoreUISearchResultItem sitecoreItem)
at Sitecore.Buckets.Pipelines.UI.FillItem.SetItemProperties.GetQuickActions(FillItemArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Buckets.Pipelines.UI.FillItem.FillItemPipeline.Run(FillItemArgs args)
at ItemBuckets.Services.Search.<ProcessRequestAsync>d__d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
&#13;
如果需要其他信息,请与我们联系。
答案 0 :(得分:1)
堆栈跟踪显示正在调用以下方法:
Sitecore.Buckets.Pipelines.UI.DynamicFields.EngagementValue.IsLockedCheck
在该方法中,实例化TrackingField
对象,该对象又调用它自己的方法InitializeProfiles
(这也出现在堆栈跟踪中)。
问题是,只有静态TrackingField
属性的值为true时才会创建Settings.Analytics.Enabled
对象,并且需要2个元素:
Analytics.Enabled
文件中的Sitecore.Analytics.config
设置必须设置为true。您确定没有启用分析,因为Sitecore似乎认为您这样做了。