Inconsistent behaviour in Properties on DynamicPublishedContent compared to Macro DynamicNode in 4.11.x
Hi,
Not really sure if this is by design or not; however when trying to retrieve User Properties on Documents and Media using DynamicPublishedContent, the codebase seems to insist that I use lower case for the first letter of the property name (i.e., I must use the exact casing of the property alias specified on the document/media type). When using the older Macro DynamicNode we were told to make the first character uppercase.
This works in 4.11.x in Views and PartialViews:
Umbraco.Media(12).video
This does not:
Umbraco.Media(12).Video
Also, It seems that Recursive lookup of properties by putting an underscore at the beginning of the property name is broken. Whenever I try the following on a DynamicPublishedContent object (CurrentPage for example) either the webserver stops responding or the thread aborts:
@CurrentPage._defaultMapCentre
However doing the same sort of thing in a Razor Macro works as it always has.
Haven't yet been able to track down the bug there...
I just noticed that the behaviour is different between Media and Documents. Media requires that a user property be accessed using the lowercase format, while a Document seems to be happy with the uppercase format. However the recursive property issue is a problem on Documents with both lowercase and uppercase variants. I haven't yet tested the recursive issue on Media types though.
Inconsistent behaviour in Properties on DynamicPublishedContent compared to Macro DynamicNode in 4.11.x
Hi,
Not really sure if this is by design or not; however when trying to retrieve User Properties on Documents and Media using DynamicPublishedContent, the codebase seems to insist that I use lower case for the first letter of the property name (i.e., I must use the exact casing of the property alias specified on the document/media type). When using the older Macro DynamicNode we were told to make the first character uppercase.
This works in 4.11.x in Views and PartialViews:
This does not:
Also, It seems that Recursive lookup of properties by putting an underscore at the beginning of the property name is broken. Whenever I try the following on a DynamicPublishedContent object (CurrentPage for example) either the webserver stops responding or the thread aborts:
@CurrentPage._defaultMapCentre
However doing the same sort of thing in a Razor Macro works as it always has.
Haven't yet been able to track down the bug there...
Actually,
I just noticed that the behaviour is different between Media and Documents. Media requires that a user property be accessed using the lowercase format, while a Document seems to be happy with the uppercase format. However the recursive property issue is a problem on Documents with both lowercase and uppercase variants. I haven't yet tested the recursive issue on Media types though.
Thanks,
Rob.
Found the issue with recursive properties on DynamicPublishedContent - logged as issue at http://issues.umbraco.org/issue/U4-1451
is working on a reply...