diff --git a/src/Controller/RevisionControllerTrait.php b/src/Controller/RevisionControllerTrait.php index e62384777098db3348d0c1f837fc863ef274f655..5c3319ccdff5b825bbca976cdb2a77932aa5b0f7 100644 --- a/src/Controller/RevisionControllerTrait.php +++ b/src/Controller/RevisionControllerTrait.php @@ -100,8 +100,8 @@ trait RevisionControllerTrait { * @return mixed[] */ protected function revisionIds(ContentEntityInterface $entity) { - $entity_type = $entity->getEntityTypeId(); - $result = $this->entityTypeManager()->getStorage($entity_type)->getQuery() + $entity_type = $entity->getEntityType(); + $result = $this->entityTypeManager()->getStorage($entity_type->id())->getQuery() ->allRevisions() ->condition($entity_type->getKey('id'), $entity->id()) ->sort($entity_type->getKey('revision'), 'DESC') diff --git a/tests/src/Kernel/RevisionBasicUITest.php b/tests/src/Kernel/RevisionBasicUITest.php index fc5dab071da6d8fde46e3472ecc02c48169fec4f..5cb764926b49126b012daaaf03e1fadc3bac00be 100644 --- a/tests/src/Kernel/RevisionBasicUITest.php +++ b/tests/src/Kernel/RevisionBasicUITest.php @@ -49,6 +49,7 @@ class RevisionBasicUITest extends KernelTestBase { public function testRevisionHistory() { $entity = EnhancedEntity::create([ 'name' => 'rev 1', + 'type' => 'default', ]); $entity->save();