umco / umbraco-nested-content

Nested Content for Umbraco 7.1 to 7.6
https://our.umbraco.org/projects/backoffice-extensions/nested-content
MIT License
45 stars 35 forks source link

Cannot resolve NestedContent values for indexing due to UmbracoContext.Current == null #126

Closed robertjf closed 7 years ago

robertjf commented 7 years ago

I'm attempting to resolve a NestedContent property on a document type in a GatheringNodeData event handler so that I can index individual properties within the NestedContent, but because UmbracoContext.Current is null in that context NestedContentValueConverter is failing here:

https://github.com/umco/umbraco-nested-content/blob/develop/src/Our.Umbraco.NestedContent/Extensions/PublishedPropertyTypeExtensions.cs#L93

var pcr = UmbracoContext.Current.PublishedContentRequest;
robertjf commented 7 years ago

Added a pull request for this: https://github.com/umco/umbraco-nested-content/pull/127