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.Modeis set toLegacy


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

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
- #6472 update the preview xml on publish actions — committed to umbraco/Umbraco-CMS by dawoe 4 years ago
- #6472 update the preview xml on publish actions (cherry picked from commit b72486cd85ae3fad4a37959dde5a528ebd2eaef6) — committed to umbraco/Umbraco-CMS by dawoe 4 years ago
- #6472 update the preview xml on publish actions — committed to umbraco/Umbraco-CMS by dawoe 4 years ago
- V7: Persist base64 images from RTE to disk (#14515) * Update ResolveImgPattern Regex * Fix: v7 BeginTransaction null reference after custom migrations (#8748) * #6472 update the preview xml on ... — committed to umbraco/Umbraco-CMS by iOvergaard a year ago
I was able to reproduce this as well. I created a PR that fixes this behavior.