IPublishedContent showing null object reference error using Vorto
I have a weird question... there is a site that has been running for 2 or 3 years without any problem. It is implemented in 7.6.5, but suddenly some pages started to show the null reference exception.
IPublishedContent showing null object reference error using Vorto
I have a weird question... there is a site that has been running for 2 or 3 years without any problem. It is implemented in 7.6.5, but suddenly some pages started to show the null reference exception.
I have this code:
it returns this: Umbraco.Core.Udi[]
It doesn't show any exception.
But when I change to this:
or
note: spaces before and after IPulblishedContent are intentionally to be shown. If I remove those spaces the post question hides the casting.
it shows the null reference exception.
It was working prefectly. This property "salaPrensaImagenEncabezado" actually has value.
These make no difference:
or
<EnablePropertyValueConverters>false</EnablePropertyValueConverters>
Error seems to be adding the IPublishedContent . Do I need an "using" or something on the top of the file? I have this heading the file:
Thank you very much in advance.
I found the way to fix this:
Can somebody explain to me why the previous code worked since 2017 and suddenly now, it is not working anymore?
Old code, working until few days ago:
Please!!
is working on a reply...