It seems if you try to filter a User Relationship View by the Relationship type, you need to put it in the base Default view for it to work. Putting it just in the display, without putting it in the Default, will not work.

Comments

jazzdrive3’s picture

And actually, this is also true for exposed filters in the User Relationships view type. An exposed filter will only display if it's in the Default display, ignoring other displays.

alex.k’s picture

Status: Active » Postponed (maintainer needs more info)

Could you post the export of your view so I can reproduce? And any screenshots if necessary

jazzdrive3’s picture

This is one with the filter in the default view, so it works. However, just delete the exposed filter, and add it back in the Block display, overriding the default, and you'll see it does not show up.

$view = new view;
$view->name = 'my_friends_full';
$view->description = 'Friends on the profile';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'user_relationships';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
  'requestee_id' => array(
    'label' => 'requestee',
    'required' => 0,
    'id' => 'requestee_id',
    'table' => 'user_relationships',
    'field' => 'requestee_id',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'requester_id' => array(
    'label' => 'requester',
    'required' => 0,
    'id' => 'requester_id',
    'table' => 'user_relationships',
    'field' => 'requester_id',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'content_profile_rel' => array(
    'id' => 'content_profile_rel',
    'table' => 'users',
    'field' => 'content_profile_rel',
    'relationship' => 'requestee_id',
  ),
));
$handler->override_option('fields', array(
  'picture' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'imagecache_preset' => '5',
    'exclude' => 0,
    'id' => 'picture',
    'table' => 'users',
    'field' => 'picture',
    'relationship' => 'requestee_id',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('sorts', array(
  'login' => array(
    'id' => 'login',
    'table' => 'users',
    'field' => 'login',
    'relationship' => 'requestee_id',
  ),
));
$handler->override_option('arguments', array(
  'requester_id' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'default_argument_type' => 'user',
    'default_argument' => '',
    'validate_type' => 'numeric',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'requester_id',
    'table' => 'user_relationships',
    'field' => 'requester_id',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'blog' => 0,
      'page' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(),
    'validate_argument_type' => 'tid',
    'validate_argument_php' => '',
  ),
));
$handler->override_option('filters', array(
  'approved' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'approved',
    'table' => 'user_relationships',
    'field' => 'approved',
    'relationship' => 'none',
  ),
  'rtype' => array(
    'operator' => 'in',
    'value' => array(
      '0' => '2',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'rtype',
    'table' => 'user_relationships',
    'field' => 'rtype',
    'relationship' => 'none',
  ),
  'title' => array(
    'operator' => 'contains',
    'value' => '',
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'title_op',
      'identifier' => 'title',
      'label' => 'Search Username',
      'optional' => 1,
      'remember' => 0,
    ),
    'case' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'content_profile_rel',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'Friends');
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 30);
$handler->override_option('use_pager', '1');
$handler->override_option('use_more', 0);
$handler->override_option('use_more_text', 'See More');
$handler->override_option('distinct', 0);
$handler->override_option('style_plugin', 'grid');
$handler->override_option('style_options', array(
  'grouping' => '',
  'columns' => '6',
  'alignment' => 'horizontal',
));
$handler->override_option('row_options', array(
  'inline' => array(
    'name_1' => 'name_1',
  ),
  'separator' => ', ',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('exposed_block', TRUE);
$handler->override_option('block_description', 'Display user\'s relationships grouped by relationship type');
$handler->override_option('block_caching', -1);
alex.k’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Works for me. I don't know why, but you had "exposed form in a block" set to yes in you block display. Even then, this exposed form block contains the filter and it works correctly.