Store revision id in originalRevisionId property to use after revision id is updated

Created on 30 September 2016, over 7 years ago
Updated 12 September 2023, 10 months ago

Problem/Motivation

After calling $entity->setNewRevision(TRUE) we have no way of knowing what revision id the entity used to be.

Considered a blocker for #2640496: Revision ID in {node} and {node_revision} can get out of sync β†’ which is critical.

Proposed resolution

Set the revision id to an originalRevisionId property in __construct
Update the originalRevisionId on post save
Return the property with getOriginalRevisionId() method

Remaining tasks

Review

User interface changes

none

API changes

Two methods added to ContentEntityBase and ContentEntityInterface

Data model changes

None

(Blocking #2809123: Reverting a revision doesn't keep moderation state β†’ )

πŸ› Bug report
Status

Fixed

Version

8.3 ⚰️

Component
EntityΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¬πŸ‡§United Kingdom timmillwood 🏴󠁧󠁒󠁷󠁬󠁳󠁿 Wales, UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024