The diff does not appear when a moderated entity is set to draft

Created on 16 February 2022, about 3 years ago
Updated 22 April 2025, 7 days ago

Problem/Motivation

When a entity is updated and moved to the Draft state, the diff of that entity does not appear.

Steps to reproduce

1. Keep the option 'Also log diff when creating / deleting content' enabled at log entity operation settings.
2. Setup content moderation for nodes.
3. Change any node state to draft, and change some fields.
4. Go to the entity log operations. At this moment the diff appears empty.

Proposed resolution

If the entity we want its diff is a revisionable entitty, load the revision instead of the entity: use loadRevision method instead of load method.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇸Spain omarlopesino

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.71.5 2024