diff --git b/core/modules/comment/config/views.view.comments_recent.yml a/core/modules/comment/config/views.view.comments_recent.yml index e2b3aff..6ae96eb 100755 --- b/core/modules/comment/config/views.view.comments_recent.yml +++ a/core/modules/comment/config/views.view.comments_recent.yml @@ -1,36 +1,30 @@ -status: '1' -module: comment -id: comment_recent -description: 'A block with recent comments.' -tag: default -base_table: comment base_field: cid -human_name: 'Recent comments' -core: '8' -langcode: en +base_table: comment +core: 8.x +description: '' +status: '1' display: + block_1: + display_plugin: block + id: block_1 + display_title: Block + position: '' + display_options: + block_description: 'Recent comments' default: + display_plugin: default id: default display_title: Master - display_plugin: default - position: '1' + position: '' display_options: - query: - type: views_query - options: - disable_sql_rewrite: '0' - distinct: '0' - slave: '0' - query_comment: '0' - query_tags: { } - title: 'Recent comments' - use_more: '0' access: type: perm options: perm: 'access comments' cache: type: none + query: + type: views_query exposed_form: type: basic pager: @@ -38,21 +32,82 @@ display: options: items_per_page: '10' offset: '0' + style: + type: html_list + options: + grouping: { } + row_class: '' + default_row_class: '1' + row_class_special: '1' + type: ul + wrapper_class: item-list + class: '' + row: + type: fields + options: + default_field_elements: '1' + inline: + subject: subject + changed: changed + separator: ' ' + hide_empty: '0' relationships: nid: id: nid table: comment field: nid - plugin_id: standard - fields: + required: '1' fields: subject: id: subject table: comment field: subject + relationship: none + group_type: group + admin_label: '' label: '' + exclude: '0' + alter: + alter_text: '0' + text: '' + make_link: '0' + path: '' + absolute: '0' + external: '0' + replace_spaces: '0' + path_case: none + trim_whitespace: '0' + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: '0' + max_length: '' + word_boundary: '0' + ellipsis: '0' + more_link: '0' + more_link_text: '' + more_link_path: '' + strip_tags: '0' + trim: '0' + preserve_tags: '' + html: '0' + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: '0' + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: '1' + empty: '' + hide_empty: '0' + empty_zero: '0' + hide_alter_empty: '1' link_to_comment: '1' - plugin_id: comment + link_to_node: '0' changed: id: changed table: comment @@ -105,20 +160,30 @@ display: custom_date_format: '' timezone: '' plugin_id: date + filters: + status: + value: '1' + table: comment + field: status + id: status + expose: + operator: '0' + group: '1' + status_node: + value: '1' + table: node + field: status + relationship: nid + id: status_node + expose: + operator: '0' + group: '1' sorts: created: id: created table: comment field: created - relationship: none - group_type: group - admin_label: '' order: DESC - exposed: '0' - expose: - label: '' - granularity: second - plugin_id: date cid: id: cid table: comment @@ -131,110 +196,23 @@ display: expose: label: '' plugin_id: standard - filters: - status: - id: status - table: comment - field: status - relationship: none - group_type: group - admin_label: '' - operator: '=' - value: '1' - group: '1' - exposed: '0' - expose: - operator_id: '0' - label: '' - description: '' - use_operator: '0' - operator: '' - identifier: '' - required: '0' - remember: '0' - multiple: '0' - remember_roles: - authenticated: authenticated - is_grouped: '0' - group_info: - label: '' - description: '' - identifier: '' - optional: '1' - widget: select - multiple: '0' - remember: '0' - default_group: All - default_group_multiple: { } - group_items: { } - plugin_id: boolean - status_1: - id: status_1 - table: node - field: status - relationship: nid - group_type: group - admin_label: '' - operator: '=' - value: '1' - group: '1' - exposed: '0' - expose: - operator_id: '0' - label: '' - description: '' - use_operator: '0' - operator: '' - identifier: '' - required: '0' - remember: '0' - multiple: '0' - remember_roles: - authenticated: authenticated - is_grouped: '0' - group_info: - label: '' - description: '' - identifier: '' - optional: '1' - widget: select - multiple: '0' - remember: '0' - default_group: All - default_group_multiple: { } - group_items: { } - plugin_id: boolean - style: - type: html_list - row: - type: fields - options: - default_field_elements: '1' - inline: - subject: subject - changed: changed - separator: ' ' - hide_empty: '0' + title: 'Recent comments' empty: - area: - id: area + area_text_custom: + id: area_text_custom table: views - field: area + field: area_text_custom relationship: none group_type: group admin_label: '' - label: 'Empty text' + label: '' empty: '1' content: 'No comments available.' - format: plain_text tokenize: '0' - plugin_id: text - block_1: - id: block_1 - display_title: Block - display_plugin: block - position: '1' - display_options: - query: - type: views_query - options: { } + plugin_id: text_custom +human_name: sdsfda +module: views +id: sdsfda +tag: '' +uuid: 796bcd9a-f9ed-48f2-9e00-af129b886f71 +langcode: en diff --git b/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php a/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php index 70e6c54..fcfe82f 100644 --- b/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php +++ a/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php @@ -64,7 +64,6 @@ function testRecentCommentBlock() { // posting a node from a node form. cache_invalidate_tags(array('content' => TRUE)); $this->drupalGet(''); - $label = $block->label(); $this->assertNoText(t('Recent comments')); user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access comments')); @@ -75,7 +74,6 @@ function testRecentCommentBlock() { $this->assertText(t('Recent comments')); // Test the only the 10 latest comments are shown and in the proper order. -debug($comments[0]->subject->value); $this->assertNoText($comments[0]->subject->value, 'Comment 11 not found in block.'); for ($i = 1; $i < 11; $i++) { $this->assertText($comments[$i]->subject->value, format_string('Comment @number found in block.', array('@number' => 11 - $i)));