我使用的是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)为了禁用分析数据库,我使用了来自here的指示。
PublishEndRemoteEvent会以某种方式使用MongoDB吗?你知道我怎么才能修好它让我再也得不到它吗?
发布于 2016-04-15 02:03:58
您需要为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://stackoverflow.com/questions/33780770
复制相似问题