RazorDynamicNode got datatype 158aa029-24ed-4948-939e-c3da209e5fba for linkToPage on Sidepanel0.20785668787030.000033 Checking for a RazorDataTypeModel for data type guid 158aa029-24ed-4948-939e-c3da209e5fba...0.2078890245661370.000032 Checking the RazorDataTypeModelTypes static mappings to see if there is a static mapping...0.2079141753295650.000025 There isn't a staticMapping defined so checking the RazorDataTypeModelTypes cache...0.2081359126724430.000222 GUID 158aa029-24ed-4948-939e-c3da209e5fba does not have a DataTypeModel, falling back to ConvertPropertyValueByDataType0.2082170110524770.000081
Presumably ConvertPropertyValueByDataType is (wrongly) typing the int of the Content Picker to a string?
What is the data type of that property? Content Picker? Is it always going to be a single number?
Indeed that parsing was changed so that it didn't upcast when it shouldn't.
Your mapping is almost right but the nodeTypeAlias is intended to be the alias of the node (e.g. in your case Sidepanel) and the document type alias is the property alias (linkToPage). Sorry for the confusing attribute names, I thought I had them clear enough (nodeTypeAlias being what the alias of the document type is usually referred to.
I'll add propertyTypeAlias in 4.7.2 (without breaking documentTypeAlias) so that this becomes clear. Sorry again!
If you flip these around, the static mapping should apply. In the next release I'll add the GUID for content picker.
so it might be worth clarifying those examples for a later release.
In any event, rather than mapping on the nodeTypeAlias (since I think there are other Content Pickers I've not found yet), I'm now mapping on the dataTypeGuid, which is working fine. (I may have also fallen foul of not touching the web.config whilst trying this yesterday, since this stuff seems to be cached at app start).
I had exactly the same problem, thanks Phil for the suggested fix.
Just to be clear about the fix, I amended the following section in umbracoSettings.config (added in 4.7.1.1), within <scripting><razor>, to add the mapping for the content picker GUID:
Dynamic{string} from content picker node in 4.7.1.1
I'm testing an upgrade to 4.7.1.1 on a recently built site, and getting errors in several macroScripts;
because the int in question is now being typed as a dynamic{string}, previously a dynamic{int}.
I can see some stuff in the commit logs referring to new RazorDataTypeModel stuff, but not sure if this relevant or how to use it?
I've tried something like this in umbracoSettings.config, but it's not working;
(Sidepanel is the document type, and linkToPage is the alias of the content picker)
Phil
Turning on umbDebugShowTrace gives;
Presumably ConvertPropertyValueByDataType is (wrongly) typing the int of the Content Picker to a string?
Hi Phil
What is the data type of that property? Content Picker?
Is it always going to be a single number?
Indeed that parsing was changed so that it didn't upcast when it shouldn't.
Your mapping is almost right but the nodeTypeAlias is intended to be the alias of the node (e.g. in your case Sidepanel) and the document type alias is the property alias (linkToPage). Sorry for the confusing attribute names, I thought I had them clear enough (nodeTypeAlias being what the alias of the document type is usually referred to.
I'll add propertyTypeAlias in 4.7.2 (without breaking documentTypeAlias) so that this becomes clear. Sorry again!
If you flip these around, the static mapping should apply. In the next release I'll add the GUID for content picker.
Gareth
Thanks Gareth; the property is indeed a standard Content Picker.
I was perhaps mislead by the commented out example;
so it might be worth clarifying those examples for a later release.
In any event, rather than mapping on the nodeTypeAlias (since I think there are other Content Pickers I've not found yet), I'm now mapping on the dataTypeGuid, which is working fine. (I may have also fallen foul of not touching the web.config whilst trying this yesterday, since this stuff seems to be cached at app start).
Phil
I had exactly the same problem, thanks Phil for the suggested fix.
Just to be clear about the fix, I amended the following section in umbracoSettings.config (added in 4.7.1.1), within <scripting><razor>, to add the mapping for the content picker GUID:
James.
is working on a reply...