diff --git a/core/modules/node/lib/Drupal/node/Tests/Views/RowPluginTest.php b/core/modules/node/lib/Drupal/node/Tests/Views/RowPluginTest.php index 97462ac..6937887 100644 --- a/core/modules/node/lib/Drupal/node/Tests/Views/RowPluginTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/Views/RowPluginTest.php @@ -107,9 +107,9 @@ public function drupalCreateComment(array $settings = array()) { public function testRowPlugin() { $view = views_get_view('test_node_row_plugin'); $view->initDisplay(); - $view->setDisplay('page'); + $view->setDisplay('page_1'); $view->initStyle(); - $view->style_plugin->row_plugin->options['view_mode'] = 'full'; + $view->rowPlugin->options['view_mode'] = 'full'; // Test with view_mode full. $output = $view->preview(); @@ -122,7 +122,7 @@ public function testRowPlugin() { } // Test with teasers. - $view->style_plugin->row_plugin->options['view_mode'] = 'teaser'; + $view->rowPlugin->options['view_mode'] = 'teaser'; $output = $view->preview(); foreach ($this->nodes as $node) { $body = $node->body; @@ -133,7 +133,7 @@ public function testRowPlugin() { } // Test with links disabled. - $view->style_plugin->row_plugin->options['links'] = FALSE; + $view->rowPlugin->options['links'] = FALSE; $output = $view->preview(); $this->drupalSetContent($output); foreach ($this->nodes as $node) { @@ -141,7 +141,7 @@ public function testRowPlugin() { } // Test with links enabled. - $view->style_plugin->row_plugin->options['links'] = TRUE; + $view->rowPlugin->options['links'] = TRUE; $output = $view->preview(); $this->drupalSetContent($output); foreach ($this->nodes as $node) { @@ -149,7 +149,7 @@ public function testRowPlugin() { } // Test with comments enabled. - $view->style_plugin->row_plugin->options['comments'] = TRUE; + $view->rowPlugin->options['comments'] = TRUE; $output = $view->preview(); foreach ($this->nodes as $node) { foreach ($this->comments[$node->id()] as $comment) { @@ -158,7 +158,7 @@ public function testRowPlugin() { } // Test with comments disabled. - $view->style_plugin->row_plugin->options['comments'] = FALSE; + $view->rowPlugin->options['comments'] = FALSE; $output = $view->preview(); foreach ($this->nodes as $node) { foreach ($this->comments[$node->id()] as $comment) { diff --git a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_row_plugin.yml b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_row_plugin.yml index 6754c35..bdd49b6 100644 --- a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_row_plugin.yml +++ b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_row_plugin.yml @@ -42,12 +42,12 @@ display: display_title: Master id: default position: { } - page: + page_1: display_options: path: test-node-row-plugin display_plugin: page display_title: Page - id: page + id: page_1 position: { } human_name: test_node_row_plugin langcode: en diff --git a/core/modules/views/views.module b/core/modules/views/views.module index eead4df..7ad18d9 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -253,7 +253,7 @@ function views_preprocess_node(&$vars) { } // Allow to alter comments and links based on the settings in the row plugin. - if (!empty($vars['view']->style_plugin->row_plugin) && $vars['view']->style_plugin->row_plugin->getPluginId() == 'node') { + if (!empty($vars['view']->rowPlugin) && $vars['view']->rowPlugin->getPluginId() == 'node') { node_row_node_view_preprocess_node($vars); } }