drupal_entity does not support content moderation

Created on 7 September 2023, 9 months ago
Updated 6 January 2024, 5 months ago

Problem/Motivation

Currently, drupal_entity_ doesn't use the revision data/latest revision of an entity.
When using content_moderation, this node contains the latest published version data, instead of the data from a newer "draft" version

Steps to reproduce

  1. Enable content moderation on a node.
  2. Create a node and publish it.
  3. Make some changes to the node and set the moderation state to draft.
  4. Render the entity using drupal_entity('node', 1) from the twig template
  5. The node doesn't contain the latest changes.
  6. Similarly if you go to revision history and from the revision list open the revision (say for the moderation state set to draft or any other) the updated data is not being rendered.

Proposed resolution

Load the revision data accordingly instead of rendering the latest published version.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: works as designed

Version

3.2

Component

Code

Created by

🇮🇳India Deepthi kumari

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

Comments & Activities

Production build 0.69.0 2024