1

我正在使用 Sitecore 8,在我停止 MongoDB 服务并在配置中设置设置以停止使用 MongoDB 进行分析后,此特定错误:

ERROR Exception while handling event Sitecore.Eventing.Remote.PublishEndRemoteEvent
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.SharedSource.PartialLanguageFallback
   at Sitecore.SharedSource.PartialLanguageFallback.Providers.FallbackLanguageProvider.ClearFallbackCaches(ItemUri itemUri, Database database)
   at Sitecore.SharedSource.PartialLanguageFallback.Providers.FallbackLanguageProvider.<>c__DisplayClass1.<InitializeEventHandlers>b__0(PublishEndRemoteEvent event)
   at Sitecore.Eventing.EventProvider.RaiseEvent(Object event, Type eventType, EventContext context)

为了禁用 Analytics 数据库,我使用了此处的指示。

PublishEndRemoteEvent 是否以某种方式使用 MongoDB?你知道我怎样才能解决这个问题,所以我不会再得到它了吗?

4

1 回答 1

0

您需要为 Sitecore.SharedSource.PartialLanguageFallback 生成一个新程序集,并进行以下更改:

如下更新以下文件:Sitecore.SharedSource.PartialLanguageFallback/Providers/FallbackLanguageProvider.cs

private void ClearFallbackCaches(ItemUri itemUri, Database database)  {
 var cache = _fallbackValuesCaches[database.Name];
 var ignore_cache = _fallbackIgnoreCaches[database.Name];

 if (cache != null)
 {
     // Added a null check on itemUri
     if (itemUri == null)
         cache.Clear();
     else
         cache.RemoveKeysContaining(itemUri.ItemID.ToString());
 }
 if (ignore_cache != null)
 {
     // Added a null check on itemUri
     if (itemUri == null)
         ignore_cache.Clear();
     else
         ignore_cache.RemoveKeysContaining(itemUri.ItemID.ToString());
 }  }

https://blog.horizo​​ntalintegration.com/2014/05/03/sitecore-partial-language-fallback-cache-clearing-issue/

于 2016-04-14T18:03:57.927 回答