diff --git a/Our.Umbraco.PropertyConverters/MultiNodeTreePickerPropertyConverter.cs b/Our.Umbraco.PropertyConverters/MultiNodeTreePickerPropertyConverter.cs index 99a2917..e9ed593 100644 --- a/Our.Umbraco.PropertyConverters/MultiNodeTreePickerPropertyConverter.cs +++ b/Our.Umbraco.PropertyConverters/MultiNodeTreePickerPropertyConverter.cs @@ -218,13 +218,25 @@ private IPublishedContent GetPublishedContent(int nodeId, ref UmbracoObjectTypes } // attempt to get the content - var content = contentFetcher(nodeId); - if (content != null) + try { - // if we found the content, assign the expected type to the actual type so we don't have to keep looking for other types of content - actualType = expectedType; + var content = contentFetcher(nodeId); + if (content != null) + { + // if we found the content, assign the expected type to the actual type so we don't have to keep looking for other types of content + actualType = expectedType; + } + + return content; + } + catch (Exception ex) + { + // we're catching the errors which are thrown from the Umbraco + // in our case from: https://github.com/umbraco/Umbraco-CMS/blob/5397f2c53acbdeb0805e1fe39fda938f571d295a/src/Umbraco.Web/Security/MembershipHelper.cs + // it's checking for the entity type and the order is content media then member and if membership provider is the custom one then the error will be thrown + LogHelper.Error(string.Format("Error during fetching IPublishedContent for nodeId: {0}", nodeId), ex); } - return content; + return null; } }