diff --git a/src/Plugin/Block/FieldBlock.php b/src/Plugin/Block/FieldBlock.php index 2dc06d082485306a6d4d0bcf1af756c1954e1479..389797238e2156375eb1cecfd90f5ac524e06dfd 100644 --- a/src/Plugin/Block/FieldBlock.php +++ b/src/Plugin/Block/FieldBlock.php @@ -458,7 +458,12 @@ class FieldBlock extends BlockBase implements ContainerFactoryPluginInterface { elseif ($entity_type === 'node') { if ($route_name == 'entity.node.revision') { $entity_revision = $this->routeMatch->getParameter('node_revision'); - $entity = $this->entityTypeManager->getStorage('node')->loadRevision($entity_revision); + if (is_numeric($entity_revision)) { + $entity = $this->entityTypeManager->getStorage('node')->loadRevision($entity_revision); + } + else { + $entity = $entity_revision; + } } elseif ($route_name == 'entity.node.preview' && $this->routeMatch->getParameter('view_mode_id') === 'full') { $entity = $this->routeMatch->getParameter('node_preview');