Umbraco 12.3.0 - Cannot get node values via node.V...
# help-with-umbraco
a
I just tried upgrading to umbraco 12.3.0 and I can no longer access node content from IPublishedContent via node.Value("bannerHeadline"). I get back an empty string - the field does have a value. It works in 12.2. I downgraded back to 12.2, and I get the correct value. This is a show stopper for us. 1. We are using model builder 2. The content on the node is stored in the default culture (en-US). 3. We are accessing the node within a ViewComponent. ex: page template: @await Component.InvokeAsync("Banner", Model) view component: public async Task InvokeAsync(IPublishedContent node) { var bannerText = node.Value("bannerHeadline"); //bannerText is an empty string, yet the field has a value, error
a
Easiest is probably to try debugging your component, set a few breakpoints, and check if any are hit/contain your value and if the correct culture is being used
Also when using Modelsbuilder, use the models, case the IPublishedContent node to the type you are using so you can easily type
'node.BannerHeadline'
instead
a
Yes we typically do use published models, but in this case we don’t know what model the current page is that is using the banner.
r
If you’re saying it worked pre-upgrade than I’m assuming it’s not a typo in the code or anything like that! Have you tried rebuilding your site cache to see if that brings the value back?
a
Yes I have cleared the cache. I’ll debug again to see if the issue can be narrowed down
Ok it looks like I found a real bug in umbraco 12.3: https://github.com/umbraco/Umbraco-CMS/issues/15117. I’ll wait for a patch. Thanks all.
r
Damn! That’s a fairly fundamental one - thanks for sharing the issue. Hopefully they’ll have that patched up pretty quick
h
appears to have been resolved in 12.3.1
a
Yes, I can confirm, 12.3.1 fixed the issue and I'm running it now without issues. Thanks all.
3 Views