diff --git a/Src/xWorks/ConfiguredLcmGenerator.cs b/Src/xWorks/ConfiguredLcmGenerator.cs
index 3841eb9e91..948ed017cb 100644
--- a/Src/xWorks/ConfiguredLcmGenerator.cs
+++ b/Src/xWorks/ConfiguredLcmGenerator.cs
@@ -1711,7 +1711,7 @@ private static IFragment GenerateContentForSenses(ConfigurableDictionaryNode con
foreach (ILexSense item in senseCollection)
{
Debug.Assert(item != null);
- if (publicationDecorator != null && publicationDecorator.IsExcludedObject(item))
+ if (publicationDecorator?.IsExcludedObject(item) ?? false)
continue;
filteredSenseCollection.Add(item);
}
@@ -2099,6 +2099,11 @@ private static IFragment GenerateCrossReferenceChildren(ConfigurableDictionaryNo
if (targetInfo == null)
return settings.ContentGenerator.CreateFragment();
var reference = targetInfo.Item2;
+ if (targetInfo.Item1 == null || (!publicationDecorator?.IsPublishableLexRef(reference.Hvo) ?? false))
+ {
+ return settings.ContentGenerator.CreateFragment();
+ }
+
if (LexRefTypeTags.IsUnidirectional((LexRefTypeTags.MappingTypes)reference.OwnerType.MappingType) &&
LexRefDirection(reference, collectionOwner) == ":r")
{
diff --git a/Src/xWorks/DictionaryPublicationDecorator.cs b/Src/xWorks/DictionaryPublicationDecorator.cs
index b8d16d461c..69988b8821 100644
--- a/Src/xWorks/DictionaryPublicationDecorator.cs
+++ b/Src/xWorks/DictionaryPublicationDecorator.cs
@@ -525,7 +525,7 @@ private bool IsPublishableReversalEntry(IReversalIndexEntry revEntry)
///
///
///
- private bool IsPublishableLexRef(int hvoRef)
+ internal bool IsPublishableLexRef(int hvoRef)
{
var publishableItems = VecProp(hvoRef, LexReferenceTags.kflidTargets);
int originalItemCount = BaseSda.get_VecSize(hvoRef, LexReferenceTags.kflidTargets);