Commit 9bcaeed6 authored by alexpott's avatar alexpott

Issue #2020353 by dawehner: Comments aren't displayed in Views when using...

Issue #2020353 by dawehner: Comments aren't displayed in Views when using Format: Unformatted list and Show: Comment | Full comment.
parent 7a0440d1
......@@ -46,7 +46,7 @@ function render($row) {
if (!$this->options['links']) {
unset($build['links']);
}
return drupal_render($build);
return $build;
}
}
<?php
/**
* @file
* Contains \Drupal\comment\Tests\Views\CommentRowTest.
*/
namespace Drupal\comment\Tests\Views;
/**
* Tests the comment row plugin.
*/
class CommentRowTest extends CommentTestBase {
/**
* Views used by this test.
*
* @var array
*/
public static $testViews = array('test_comment_row');
public static function getInfo() {
return array(
'name' => 'Comment: Row Plugin',
'description' => 'Tests the comment row plugin.',
'group' => 'Views module integration',
);
}
/**
* Test comment row.
*/
public function testCommentRow() {
$this->drupalGet('test-comment-row');
$result = $this->xpath('//article[contains(@class, "comment")]');
$this->assertEqual(1, count($result), 'One rendered comment found.');
}
}
base_field: cid
base_table: comment
core: 8.x
description: ''
status: '1'
display:
default:
display_plugin: default
id: default
display_title: Master
position: '1'
display_options:
access:
type: perm
options:
perm: 'access content'
cache:
type: none
options: { }
query:
type: views_query
options:
disable_sql_rewrite: '0'
distinct: '0'
slave: '0'
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: '0'
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: '1'
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: full
options:
items_per_page: '10'
offset: '0'
id: '0'
total_pages: ''
expose:
items_per_page: '0'
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 20, 40, 60'
items_per_page_options_all: '0'
items_per_page_options_all_label: '- All -'
offset: '0'
offset_label: Offset
tags:
previous: ' previous'
next: 'next ›'
first: '« first'
last: 'last »'
quantity: '9'
style:
type: default
row:
type: 'entity:comment'
options:
links: '1'
view_mode: full
relationships:
nid:
id: nid
table: comment
field: nid
required: '1'
relationship: none
group_type: group
admin_label: Content
fields:
subject:
id: subject
table: comment
field: subject
label: ''
alter:
alter_text: '0'
make_link: '0'
absolute: '0'
trim: '0'
word_boundary: '0'
ellipsis: '0'
strip_tags: '0'
html: '0'
hide_empty: '0'
empty_zero: '0'
link_to_comment: '1'
relationship: none
group_type: group
admin_label: ''
exclude: '0'
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: '1'
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: '1'
empty: ''
hide_alter_empty: '1'
link_to_node: '0'
filters:
status:
value: '1'
table: comment
field: status
id: status
expose:
operator: '0'
group: '1'
status_node:
value: '1'
table: node_field_data
field: status
relationship: nid
id: status_node
expose:
operator: '0'
group: '1'
sorts: { }
title: test_comment_row
header: { }
footer: { }
empty: { }
arguments: { }
page_1:
display_plugin: page
id: page_1
display_title: Page
position: '1'
display_options:
path: test-comment-row
label: test_comment_row
module: views
id: test_comment_row
tag: ''
langcode: en
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment