Umbraco-CMS: Preview mode unable to retrieve other pages from cache

Bug summary

Since Umbraco 7.15.0 we are unable to use the preview function in at least 3 of our websites. While loading the previewed page I try to retrieve other pages using content.AncestorOrSelf() or content.Siblings() and I receive null or unexpected results (see screenshots).

Specifics

  • 7.15.0 up to 7.15.3
  • The bug disappears when Umbraco.Preview.Mode is set to Legacy

RenderModel

Siblings

This is interesting, only previously previewed pages are showing up in the list but the page with ID 1050 should not be a sibling.

db-cmsPreviewXml

Expected result

A webpage that loads in successfully without exceptions.

Actual result

NullReferenceException in the code that runs fine outside the preview mode.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (18 by maintainers)

Commits related to this issue

Most upvoted comments

I was able to reproduce this as well. I created a PR that fixes this behavior.