Problem/Motivation

The "is previewing" flag does not get set on the edit forms. There are edge cases where we want to render content or otherwise rely on the "is previewing" flag on entity edit forms, and they should display the same as on the "latest" route.

Steps to reproduce

Visit an entity edit form and check the "is previewing" value.

Proposed resolution

Check the route's entity parameter flags. If load_latest_revision is TRUE, then set previewing. This handles all existing cases plus edit forms.

Alternatively, I could just make a separate "PreviewDectector" plugin for my project, but I wanted to first see if you agree it fits the overall use-case.

Remaining tasks

Review patch

User interface changes

None.

API changes

None.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hawkeye.twolf created an issue. See original summary.

hawkeye.twolf’s picture

Status: Active » Needs review
e0ipso’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.