diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index 57df49d..b6f56af 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -811,10 +811,9 @@ public function usesFields() { public function getPlugin($type) { // Look up the plugin name to use for this instance. $options = $this->getOption($type); - $name = $options['type']; // Return now if no options have been loaded. - if (empty($options)) { + if (empty($options) || !isset($options['type'])) { return; } @@ -823,6 +822,9 @@ public function getPlugin($type) { $views_data = Views::viewsData()->get($this->view->storage->get('base_table')); $name = isset($views_data['table']['base']['query_id']) ? $views_data['table']['base']['query_id'] : 'views_query'; } + else { + $name = $options['type']; + } // Plugin instances are stored on the display for re-use. if (!isset($this->plugins[$type][$name])) { diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php index 74b90c7..548eaa6 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php @@ -74,7 +74,7 @@ public function testMenuOptions() { $this->drupalPost(NULL, array('tab_options[type]' => 'tab', 'tab_options[title]' => $this->randomString()), t('Apply')); $this->assertResponse(200); - $this->assertUrl('admin/structure/views/view/test_view'); + $this->assertUrl('admin/structure/views/view/test_view/edit/page_1'); $this->drupalGet('admin/structure/views/view/test_view'); $this->assertLink(t('Tab: @title', array('@title' => 'Test tab title')));