This is a really strange behaviour and I hope I'm not doing anything silly here. I have this code:
public class BlogSurfaceController : SurfaceController
{
[ChildActionOnly]
public PartialViewResult ExploreMore(int size = 4)
{
var articles = Umbraco.ContentAtXPath("//" + Post.ModelTypeAlias);
return PartialView("Blog/_RandomArticles", articles);
}
}
Super simple. If I hover with the mouse over where the articles are retieved I get 4 articles. Then I hover over the articles variable in the return statement and I get an empty value then I hover over the previos=us articles again and it's empty.
I got to this issue trying to get random articles from my blog, when I iterate over the collection the script can't find any articles, but they were there!
IEnumerable empty with no reason
This is a really strange behaviour and I hope I'm not doing anything silly here. I have this code:
Super simple. If I hover with the mouse over where the articles are retieved I get 4 articles. Then I hover over the articles variable in the return statement and I get an empty value then I hover over the previos=us articles again and it's empty.
I got to this issue trying to get random articles from my blog, when I iterate over the collection the script can't find any articles, but they were there!
This was solved upgrading Umbraco to v8.6.3 It's related to this bug: https://github.com/umbraco/Umbraco-CMS/issues/7798
is working on a reply...