GetProperty returns PropertyResult which is IProperty, it's part of the compatibility with being able to access media and nodes in the same way. This is because Media comes from Examine now, which doesn't have a GetProperty function and I was trying to standardise the access.
You should change your script to use GetPropertyValue which will return the value, previously GetProperty would have fallen back to INode.GetProperty.
I will implement IHtmlString on PropertyResult to return the property value which will allow GetProperty to either be used to get the property or output the property value as you are doing here.
Broken razor script testing 4.7.1 nightly builds
Hi
I've been doing some testing of the 4.7.1 nighltys and found a few of my razor scripts no longer work. I'll start with a pretty simple one.
This works fine in 4.7.0 but in the nightly instead of the property 'MonthName' it outputs umbraco.MacroEngines.PropertyResult.
Can someone let me know what has change to cause this?
Cheers
Evan
Hi Evan
GetProperty returns PropertyResult which is IProperty, it's part of the compatibility with being able to access media and nodes in the same way.
This is because Media comes from Examine now, which doesn't have a GetProperty function and I was trying to standardise the access.
You should change your script to use GetPropertyValue which will return the value, previously GetProperty would have fallen back to INode.GetProperty.
I will implement IHtmlString on PropertyResult to return the property value which will allow GetProperty to either be used to get the property or output the property value as you are doing here.
Gareth
is working on a reply...