Hello,
in older versions of the User Points module there was 'tid' field declared for 'userpoints' views table. As of current latest version (1.1), this field has gone. But when constructing views it still may be necessary to filter userpoints records by category (my project does that, for example).

So, why not to return this field back by simply returning this piece of code to userpoints.views.inc?

  // Describe the points column of the userpoints table.
  $data['userpoints']['points'] = array(
    'title' => t('!Points', userpoints_translation()),
    'help' => t("A User's current !points.", userpoints_translation()), // The help that appears on the UI,
    'field' => array(
      'handler' => 'views_handler_field_numeric',
      'click sortable' => TRUE,
    ),
    'argument' => array(
      'handler' => 'views_handler_argument_numeric',
      'numeric' => TRUE,
      'name field' => 'points', // display this field in the summary
    ),
    'filter' => array(
      'handler' => 'views_handler_filter_numeric',
    ),
    'sort' => array(
      'handler' => 'views_handler_sort',
    ),
  );

Thank you!

Comments

kbahey’s picture

Status: Active » Postponed (maintainer needs more info)

Please try 6.x-1.x-dev and report back if this is still a problem.

berdir’s picture

Status: Postponed (maintainer needs more info) » Active

This might be related to what BenK reported as a bug for the 7.x-1.x branch. In particular, the category field uses the default term_node field/sort/argument handlers but that doesn't make sense because it is specifically designed for terms assigned to a node.

I'll try to create a patch for 7.x and backport it later on.

BenK’s picture

Subscribing...

berdir’s picture

Status: Active » Closed (duplicate)

#871126: Fix Bugs in Views Integration has now a patch for which I will create a backport as soon as it is working.