diff --git a/core/modules/comment/src/CommentViewsData.php b/core/modules/comment/src/CommentViewsData.php index 2d9b021..4fde17b 100644 --- a/core/modules/comment/src/CommentViewsData.php +++ b/core/modules/comment/src/CommentViewsData.php @@ -146,10 +146,10 @@ public function getViewsData() { ), ); - $data['comment_field_data']['status']['title'] = $this->t('Approved status'); - $data['comment_field_data']['status']['help'] = $this->t('Whether the comment is approved (or still in the moderation queue).'); - $data['comment_field_data']['status']['filter']['label'] = $this->t('Approved comment status'); - $data['comment_field_data']['status']['filter']['type'] = 'yes-no'; + $data['comment_field_data']['status__value']['title'] = $this->t('Approved status'); + $data['comment_field_data']['status__value']['help'] = $this->t('Whether the comment is approved (or still in the moderation queue).'); + $data['comment_field_data']['status__value']['filter']['label'] = $this->t('Approved comment status'); + $data['comment_field_data']['status__value']['filter']['type'] = 'yes-no'; $data['comment']['approve_comment'] = array( 'field' => array( diff --git a/core/modules/node/src/NodeViewsData.php b/core/modules/node/src/NodeViewsData.php index 21e1e44..6526fa0 100644 --- a/core/modules/node/src/NodeViewsData.php +++ b/core/modules/node/src/NodeViewsData.php @@ -34,10 +34,10 @@ public function getViewsData() { $data['node_field_data']['langcode']['help'] = $this->t('The language of the content or translation.'); - $data['node_field_data']['status']['filter']['label'] = $this->t('Published status'); - $data['node_field_data']['status']['filter']['type'] = 'yes-no'; + $data['node_field_data']['status__value']['filter']['label'] = $this->t('Published status'); + $data['node_field_data']['status__value']['filter']['type'] = 'yes-no'; // Use status = 1 instead of status <> 0 in WHERE statement. - $data['node_field_data']['status']['filter']['use_equal'] = TRUE; + $data['node_field_data']['status__value']['filter']['use_equal'] = TRUE; $data['node_field_data']['status_extra'] = array( 'title' => $this->t('Published status or admin user'), diff --git a/core/modules/views/src/EntityViewsData.php b/core/modules/views/src/EntityViewsData.php index 61def5a..9fc11d0 100644 --- a/core/modules/views/src/EntityViewsData.php +++ b/core/modules/views/src/EntityViewsData.php @@ -459,6 +459,13 @@ protected function mapSingleFieldViewsData($table, $field_name, $field_type, $co $views_field['sort']['id'] = 'standard'; break; + case 'status': + $views_field['field']['id'] = 'field'; + $views_field['argument']['id'] = 'numeric'; + $views_field['filter']['id'] = 'boolean'; + $views_field['sort']['id'] = 'standard'; + break; + case 'text': case 'text_with_summary': // Treat these three long text fields the same.