Sitecore 8 Sitecore.Eventing.Remote.PublishEndRemoteEvent

396 Views Asked by At

I am using Sitecore 8 and after I stopped the MongoDB service and set the setting in configs to stop using MongoDB for analytics this specific error:

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)

To disable the Analytics database I've used the indications from here.

Does PublishEndRemoteEvent use somehow MongoDB? Do you know how can I fix this so I won't get it anymore?

1

There are 1 best solutions below

0
On

You need to generate a new assembly for Sitecore.SharedSource.PartialLanguageFallback with the following change:

Update the below file as follows: 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.horizontalintegration.com/2014/05/03/sitecore-partial-language-fallback-cache-clearing-issue/