I am using the Answers module 7.x-4.0-rc2. I would like to have links to different displays of the questions view so that one link goes to only unanswered questions and the other link shows all. When I go to filter options, I'm not sure how to filter the content by if there is an answer or not.
This is done on the demo site but out of the box, the 7.x-4.0-rc2 version of the module doesn't have any special views. See screenshot of the demo site below.
Edit: When attempting to import views from https://www.drupal.org/node/2783513#comment-11516603 as suggested, I get the following errors for rankings.txt, repeated:
- Style plugin datatables is not available.
- Field handler userpoints_total.points is not available.
- Field handler userpoints_total.last_update is not available.
- Sort criterion handler userpoints_total.points is not available.
- Unable to import view.
When importing questions.txt, I get:
- Style plugin datatables is not available.
- Field handler userpoints_total.points is not available.
- Field handler field_data_field_tags.field_tags is not available.
- Relationship handler userpoints_total.uid is not available.
- Unable to import view.
I attempted installing answers_userpoints
(which is uninstalled) but could not do so because it depends on userpoints_rules
, which couldn't be found or downloaded.
Edit 2: I took a look at the code for the exported view for unanswered questions, and believe that section I need to replicate is the following portion; this issue I am having is that COUNT(Flags: Flagged)
doesn't seem to be available as a filter but I do have flag enabled.
/* Filter criterion: COUNT(Flags: Flagged) */
$handler->display->display_options['filters']['flagged']['id'] = 'flagged';
$handler->display->display_options['filters']['flagged']['table'] = 'flagging';
$handler->display->display_options['filters']['flagged']['field'] = 'flagged';
$handler->display->display_options['filters']['flagged']['relationship'] = 'flag_content_rel';
$handler->display->display_options['filters']['flagged']['group_type'] = 'count';
$handler->display->display_options['filters']['flagged']['operator'] = '!=';
$handler->display->display_options['filters']['flagged']['value']['value'] = '1';