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

Issue fork tmgmt-3478739

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

berdir created an issue. See original summary.

berdir’s picture

Status: Active » Needs review

.

  • berdir committed 4b7b36fa on 8.x-1.x
    Issue #3478739 by berdir: Create revision before changing values, set...
berdir’s picture

Status: Needs review » Fixed

Merged.

Status: Fixed » Closed (fixed)

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