diff --git a/core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php index 837ff1a..6236520 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php @@ -84,6 +84,12 @@ protected function getQueryServiceName() { /** * {@inheritdoc} */ + protected function doLoadRevisionFieldItems($revision_id) { + } + + /** + * {@inheritdoc} + */ protected function doSaveFieldItems(ContentEntityInterface $entity, array $names = []) { } diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php index b1da527..95bc44e 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php @@ -187,7 +187,7 @@ public function loadRevision($revision_id) { $revision = $this->doLoadRevisionFieldItems($revision_id); if ($revision) { - $entities = [$revision]; + $entities = [$revision->id() => $revision]; $this->invokeStorageLoadHook($entities); $this->postLoad($entities); } @@ -198,11 +198,11 @@ public function loadRevision($revision_id) { /** * Actually loads revision field item values from the storage. * - * @param int $revision_id + * @param int|string $revision_id * The revision identifier. * - * @return \Drupal\Core\Entity\ContentEntityInterface|null - * The re + * @return \Drupal\Core\Entity\EntityInterface|null + * The specified entity revision or NULL if not found. */ abstract protected function doLoadRevisionFieldItems($revision_id); diff --git a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php index 98cd4b4..f7b4b4a 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php @@ -79,7 +79,7 @@ public function loadUnchanged($id); /** * Load a specific entity revision. * - * @param int $revision_id + * @param int|string $revision_id * The revision id. * * @return \Drupal\Core\Entity\EntityInterface|null