diff -u b/core/modules/layout_builder/src/Plugin/Block/InlineBlock.php b/core/modules/layout_builder/src/Plugin/Block/InlineBlock.php --- b/core/modules/layout_builder/src/Plugin/Block/InlineBlock.php +++ b/core/modules/layout_builder/src/Plugin/Block/InlineBlock.php @@ -231,14 +231,9 @@ } elseif (!empty($this->configuration['block_uuid'])) { $entity = $this->entityTypeManager->getStorage('block_content')->loadByProperties(['uuid' => $this->configuration['block_uuid']]); - if (!$entity) { - $this->logger->error('Unable to load inline block content entity with UUID %uuid.', ['%uuid' => $this->configuration['block_uuid']]); - } - else { - $this->blockContent = current($entity); - } + $this->blockContent = $entity ?? current($entity) : NULL; } - elseif (empty($entity) && !empty($this->configuration['block_revision_id'])) { + elseif (!empty($this->configuration['block_revision_id'])) { $entity = $this->entityTypeManager->getStorage('block_content')->loadRevision($this->configuration['block_revision_id']); $this->blockContent = $entity; } @@ -283,6 +278,10 @@ $block = unserialize($this->configuration['block_serialized']); } if ($duplicate_block) { + if (empty($block) && !empty($this->configuration['block_uuid'])) { + $entity = $this->entityTypeManager->getStorage('block_content')->loadByProperties(['uuid' => $this->configuration['block_uuid']]); + $block = $entity ?? current($entity) : NULL; + } if (empty($block) && !empty($this->configuration['block_revision_id'])) { $block = $this->entityTypeManager->getStorage('block_content')->loadRevision($this->configuration['block_revision_id']); }