ModelsBuilder object not hydrating Multinode treepicker?
Hi – I have a “footer navigation” property based on Multinode treepicker and have picked some content, but the property is empty when I try to use it on a view.
Modelsbuilder generates the following as expected:
///<summary>
/// Footer Navigation: Pick items to show on the footer navigation
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "9.0.0-rc002+4b7481955abecdd8aefa37d7fb3bfa89e3f46686")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("footerNavigation")]
public virtual global::System.Collections.Generic.IEnumerable<global::Umbraco.Cms.Core.Models.PublishedContent.IPublishedContent> FooterNavigation => this.Value<global::System.Collections.Generic.IEnumerable<global::Umbraco.Cms.Core.Models.PublishedContent.IPublishedContent>>(_publishedValueFallback, "footerNavigation");
The iPublishedContent seems to have the picked content items:
But the ‘strongly typed’ property in the ModelsBuilder object is null
Any ideas if this issue is unique to my setup? Im on RC2
that switched a check for whether an UmbracoContext exists...(the boolean was around the wrong way - we've all done it!)
If I read it correctly, with that logic around the wrong way in rc2, then the attempt to convert to IPublishedContent would never happen... so it looks like it's fixed... for the next release.
In the meantime, you could probably read the raw values and use Umbraco cache from UmbracoContext.Content to retrieve the IPublishedContent and then cast them to the appropriate ModelsBuilder type if needs be.
ModelsBuilder object not hydrating Multinode treepicker?
Hi – I have a “footer navigation” property based on Multinode treepicker and have picked some content, but the property is empty when I try to use it on a view.
Modelsbuilder generates the following as expected:
The iPublishedContent seems to have the picked content items:
But the ‘strongly typed’ property in the ModelsBuilder object is null
Any ideas if this issue is unique to my setup? Im on RC2
thanks
Hi Andrew
The modelsbuilder will be using the PropertyValueConverter for the Multinodetreepicker, to take the raw values and turn them into IPublishedContent.
I can see there was a commit 14 days ago on the dev/v9 branch:
https://github.com/umbraco/Umbraco-CMS/commit/a8eae13e0e478dda206b7617e10b986afa600056
that switched a check for whether an UmbracoContext exists...(the boolean was around the wrong way - we've all done it!)
If I read it correctly, with that logic around the wrong way in rc2, then the attempt to convert to IPublishedContent would never happen... so it looks like it's fixed... for the next release.
In the meantime, you could probably read the raw values and use Umbraco cache from UmbracoContext.Content to retrieve the IPublishedContent and then cast them to the appropriate ModelsBuilder type if needs be.
regards
Marc
Ok thanks for confirming Marc. Think i'll just await RC3 :)
This seems to be still happening in v10.
Well, it is working. The issue I am having is with media type under a custom media type that I am using as a container.
is working on a reply...