Skip to content

Commit fdc62e6

Browse files
author
Shikha Mishra
authored
Fixed #26118
Fixed #26118 cmsBlocks that has scope limited to specific Store View can be seen on other Store Views in case there are Blocks with identical identifiers on both Store Views
1 parent 06a0dd0 commit fdc62e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/code/Magento/Cms/Model/BlockRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public function save(Data\BlockInterface $block)
133133
public function getById($blockId)
134134
{
135135
$block = $this->blockFactory->create();
136+
$block->setStoreId($this->storeManager->getStore()->getId());
136137
$this->resource->load($block, $blockId);
137138
if (!$block->getId()) {
138139
throw new NoSuchEntityException(__('The CMS block with the "%1" ID doesn\'t exist.', $blockId));

0 commit comments

Comments
 (0)