Update deprecated loadRevision() call for Drupal 11

Created on 31 March 2025, 6 days ago

Problem/Motivation

undo functionality called EntityStorageInterface::loadRevision(), which was removed from Drupal 11.0.0. Presumably undo will fail in D11.

Steps to reproduce

  • Open codebase in an IDE with Intellisense. Observe strikethrough of deprecated method call (see attached screenshot from VS Code).
  • Presumably, install this module in a Drupal 11 installation. Perform a replace, then attempt to undo the replace. Should receive a runtime error.

Proposed resolution

Change Node::undo() and Paragraph::undo() to use \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision

Remaining tasks

User interface changes

None.

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States flagbrad

Live updates comments and jobs are added and updated live.
  • API change

    Changes an existing API or subsystem. Not backportable to earlier major versions, unless absolutely required to fix a critical bug.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024