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.
Issue fork entity_reference_preview-3200888
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
Comment #3
hawkeye.twolfComment #4
e0ipso