Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jonok 297 posts 657 karma points
    Jan 26, 2016 @ 05:12
    jonok
    0

    Blog working fine, then PostService.Instance.GetPosts returns empty

    I've had this happen on 2 installs of Umbraco 7 where I'm using ublogsy 4.1 and it's all working fine for a few weeks, and then (seemingly) out of nowhere the blog lists (on home page and the blog landing page) become empty even though blog posts exist. The problem seems to be when I call the PostService.Instance.GetPosts method, and the PostService.Instance.GetLabels also returns empty too.

    One time I managed to fix this by deploying the site to a staging server and the blog posts started showing up again. This led me to believe it could be something to do with the Examine index (or something else in the temp folder?). So I've tried deleting the temp folder, and rebuilding examine indexes but that isn't fixing the problem.

    However, I am also using the EzSearch package and this returns the blog items in the search results, so they are definitely in the examine index.

    Has anybody seen this empty GetPosts problem before?

  • Michael Sims 119 posts 387 karma points
    Mar 22, 2016 @ 06:47
    Michael Sims
    0

    Hi Jonok, Any luck resolving this one?

  • jonok 297 posts 657 karma points
    Mar 22, 2016 @ 10:52
    jonok
    0

    Hi Michael, No - and it was very frustrating. I tried as many solutions as I could find but to no avail this time. I ended up rewriting all of the blog sections so they didn't use the ublogsy PostService methods - wasted a lot of time but got it working by just writing custom code to display the blog items (using traditional razor queries) and to filter on categories etc. It doesn't use Examine so I'm not sure how efficient it is either. I can send you some code snippets if you want, but I was in a hurry so it's not the most elegant solution, but my client got a functioning blog :)

  • Jamie Hall 7 posts 77 karma points
    Apr 25, 2016 @ 08:33
    Jamie Hall
    0

    Hi, I am experiencing the same problem. Its very weird as sometimes I can re-publish the blog items and they will display and other times they won't. if you could post some code snippets for your solution, that would be great.

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft