Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
This is a really strange behaviour and I hope I'm not doing anything silly here. I have this code:
public class BlogSurfaceController : SurfaceController
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!
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...
Write your reply to:
Image will be uploaded when post is submitted