Previews of drafts
The interface can preview versions that readers do not see, such as drafts. It names the versions
with preview, then loads the page with its instance id in the address:
// the instance is the interface's own id: 16 to 64 letters, digits, '-' and '_'
{ "type": "preview", "payload": { "instance": "a3f9c2d17be84e0f", "revisions": [{ "id": "…", "revision": "…" }] } }GET /coming-soon?relatude-preview=a3f9c2d17be84e0fRelatudeCmsContext reads the named revisions for that request, published or not: by id, in
queries, in relation ends and at the version's own URL, even for a page with nothing published.
Everything else is the request's own. The visitor is the site's, often anonymous, and read access and
culture apply as for any page, so a members-only draft sends an anonymous visitor to the login. A
file the page loads, such as a draft's picture, is read in the preview too. A link followed from the
page leaves the preview.
nowreads the site as it will be at that time, so content released later shows.versionsnames older versions from a node's history,{ id, at, revision? }.- A preview holds up to 20 versions, of nodes the user can read in edit view (404 otherwise).
Another user's instance is 403. Sending no versions and no
nowends the preview. - The server keeps a preview in memory for two hours after it was last used. A restart forgets it, and the interface names its versions again before it reloads the preview.
Views and controllers that read through RelatudeCmsContext.DB show previews with no code of their
own. Code that reads through Admin or IRelatudeDBAccessor does not see them.