Skip to content
Snippets Groups Projects

fix: use the proper API to create a new revision as per #2924724

1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -83,7 +83,8 @@ class ParagraphLineageRevisioner {
@@ -83,7 +83,8 @@ class ParagraphLineageRevisioner {
}
}
try {
try {
$entity->setNewRevision();
$storage = $this->entityTypeManager->getStorage($entity->getEntityTypeId());
 
$entity = $storage->createRevision($entity);
}
}
catch (\LogicException $e) {
catch (\LogicException $e) {
// A content entity not necessarily supports revisioning.
// A content entity not necessarily supports revisioning.
Loading