By sam152 on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.5.x
Introduced in version:
8.5.0
Issue links:
Description:
For modules that use the pending revisions API, often it's useful to load the latest revision of an entity in a route parameter. This option has been added to the entity parameter converter in core, so loading the latest revision is easy. The following can be added to a route definition to load the latest revision:
Before:
foo_route:
path: '/foo/{node}'
...
options:
parameters:
node:
type: 'entity:node'
After:
foo_route:
path: '/foo/{node}'
...
options:
parameters:
node:
type: 'entity:node'
load_latest_revision: TRUE
This option has been applied automatically to all revisionable entity forms, so data in pending revisions is retained when entities are edited and saved. Modules using pending revisions now don't have to provide additional converters to ensure no data is lost.
Impacts:
Module developers