diff --git a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php index 39141f4..4bb3b3a 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php +++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php @@ -49,7 +49,7 @@ protected function defineOptions() { $options['allow'] = array( 'contains' => array( - 'items_per_page' => array('default' => TRUE), + 'items_per_page' => array('default' => 'items_per_page'), ), ); 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 c7b5c21..fe4438d 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php @@ -63,7 +63,7 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi // Load the view. $view = $storage_controller->load($name); $this->view = $executable_factory->get($view); - $this->view->setDisplay($this->displayID); + $this->displaySet = $this->view->setDisplay($this->displayID); parent::__construct($configuration, $plugin_id, $plugin_definition); } @@ -122,28 +122,39 @@ public function build() { */ public function settings() { $settings = array(); - return $this->view->display_handler->blockSettings($settings); + + if ($this->displaySet) { + return $this->view->display_handler->blockSettings($settings); + } + + return $settings; } /** * {@inheritdoc} */ public function blockForm($form, &$form_state) { - return $this->view->display_handler->blockForm($this, $form, $form_state); + if ($this->displaySet) { + return $this->view->display_handler->blockForm($this, $form, $form_state); + } } /** * {@inheritdoc} */ public function blockValidate($form, &$form_state) { - $this->view->display_handler->blockValidate($this, $form, $form_state); + if ($this->displaySet) { + $this->view->display_handler->blockValidate($this, $form, $form_state); + } } /** * {@inheritdoc} */ public function blockSubmit($form, &$form_state) { - $this->view->display_handler->blockSubmit($this, $form, $form_state); + if ($this->displaySet) { + $this->view->display_handler->blockSubmit($this, $form, $form_state); + } } /**