diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php index a338538..58e2d6a 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php @@ -40,6 +40,9 @@ public static function getInfo() { * @see http://drupal.org/node/652712 */ public function testStorePagerSettings() { + // Show the master display so the override selection is shown. + config('views.settings')->set('ui.show.master_display', TRUE)->save(); + $admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration')); $this->drupalLogin($admin_user); // Test behaviour described in http://drupal.org/node/652712#comment-2354918. @@ -96,7 +99,7 @@ public function testStorePagerSettings() { $edit = array( 'pager[type]' => 'mini', ); - $this->drupalPostForm('admin/structure/views/nojs/display/test_store_pager_settings/page_1/pager', $edit, t('Apply')); + $this->drupalPostForm('admin/structure/views/nojs/display/test_store_pager_settings/default/pager', $edit, t('Apply')); $this->drupalGet('admin/structure/views/view/test_store_pager_settings/edit'); $this->assertText('Mini', 'Changed pager plugin, should change some text'); diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc index 8631f25..29d1787 100644 --- a/core/modules/views_ui/admin.inc +++ b/core/modules/views_ui/admin.inc @@ -392,6 +392,13 @@ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) { '#title' => t('For'), // @TODO: Translators may need more context than this. '#options' => $display_dropdown, ); + + // The dropdown should be hidden if there is no master shown and just one + // additional display (mostly page). + if (!config('views.settings')->get('ui.show.master_display')) { + $form['override']['dropdown']['#access'] = count($displays) > 2; + } + if ($current_display->isDefaulted($section)) { $form['override']['dropdown']['#default_value'] = 'defaults'; }