Create revision before changing values, set revision author and time

Created on 4 October 2024, 6 months ago

Problem/Motivation

Currently, ContentEntitySource creates a new revision only before saving. However, createRevision() assumes that this is done before values are changed, as it for example sets the ->original property to a clone of the current object.

As a result, certain things, like detection of value changes and firing of translation_insert hooks may not fire correctly.

Additionally, it doesn't set revision author and time, resulting in those values to be stale.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Source: Entity

Created by

🇨🇭Switzerland berdir Switzerland

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024