NullReferenceException caused when attempting to use nested content. This pattern is showing up in many places on my application. How is it possible to pass HasValue check but still throw NullReferenceException on attempt to access?
Hi, Ever found the issue with this? I'm running into an issue where tthe nested content value is throwing a nullreference error whe I try and access it from the indexvaluestranforming event of examine index
Nested Content: NullReferenceException
NullReferenceException caused when attempting to use nested content. This pattern is showing up in many places on my application. How is it possible to pass
HasValue
check but still throwNullReferenceException
on attempt to access?Thanks!
Hi Addison
What Umbraco version are you using?
Are you sure that data is presented in the property?
Alex
Alex,
Thanks for your help. Umbraco 8.0.1. I am sure that the content is in and published in the nested content field.
Thanks, Addison
Hey Addison,
Can you show more of your view? It's possible the error is lying to you about which line the issue is actually on :-)
Nik
I'm having this same exact issue. Has anyone found any reasons why this is happening.
I have checked my nested property to make sure all properties of the element are filled in.
Update (over 24 hours later): I deleted and rebuilt the nested datatype and the element and I STILL have a null reference.
Hi, Ever found the issue with this? I'm running into an issue where tthe nested content value is throwing a nullreference error whe I try and access it from the indexvaluestranforming event of examine index
Hi Gabor, not searched for or found the solution, but there's is a workaround that helpes to bypass this error:
try adding a second (dummy)element to your nested content type. At some point this was a remedy to this exact error.
Using ModelsBuilder also seems to do the trick, but upgrading older projects to use it, is not always the most efficient solution.
is working on a reply...