diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php index 2515501..dcb873a 100644 --- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php @@ -113,7 +113,7 @@ public function testViewsBlockForm() { $this->assertNoFieldById('edit-machine-name', 'stark.views_block__test_view_block_1', 'The machine name is hidden on the views block form.'); // Save the block. $this->drupalPost(NULL, array(), t('Save block')); - $storage = \Drupal::entityManager()->getStorageController('block'); + $storage = $this->container->get('plugin.manager.entity')->getStorageController('block'); $blocks = $storage->load(array('stark.views_block__test_view_block_block_1')); // This will only return a result if our new block has been created with the // expected machine name. diff --git a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php index bac19d3..43c0813 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php @@ -132,6 +132,7 @@ public function getView() { * The new block instance ID. */ public function generateBlockInstanceID(EntityStorageControllerInterface $manager) { + $this->view->setDisplay($this->displayID); $original_id = 'views_block__' . $this->view->storage->id() . '_' . $this->view->current_display; // Get an array of block IDs without the theme prefix.