Hi,

After made many tests, I realized that Node reference token not passed to argument when using Quick tab. I listed the test result below:

I configured as following: node id [Content node] + og group [view argument] + quick tab [argument %1, content node]. It worked PERFECTLY.

I configured as following: node reference nid [Content node] + nid [view argument] + quick tab [argument %1, content node]. It did NOT work and showed empty txt.

My view is very simple. I exported it below. The content type test1 has nothing but node referent field to test2. test2 has nothing(except the basic node structure).

I attached the result image too. It shows that with DS, it is OK; however, with quicktab does not work. I am not sure this is problem of quicktab or view attach. Any opinions are welcome.

Thanks.

hosais

$view = new view;
$view->name = 'test';
$view->description = 'test for reference view attach';
$view->tag = 'test';
$view->view_php = '';
$view->base_table = 'node';
$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('fields', array(
  'title' => array(
    'label' => 'Title',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'created' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 1,
      'text' => '[created] created',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'nid' => array(
    'default_action' => 'empty',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'node',
    'validate_fail' => 'empty',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '3' => 0,
      '4' => 0,
      '8' => 0,
      '6' => 0,
      '5' => 0,
      '7' => 0,
      '10' => 0,
      '9' => 0,
    ),
    'me_redirect' => 0,
    'me_validate_user_argument_type' => 'uid',
    'me_validate_user_roles' => array(
      '2' => 0,
      '3' => 0,
      '4' => 0,
      '8' => 0,
      '6' => 0,
      '5' => 0,
      '7' => 0,
      '10' => 0,
      '9' => 0,
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_image_size' => '_original',
    'default_argument_fixed' => '',
    'default_argument_user' => 0,
    'default_argument_php' => '',
    'image_size' => array(
      '_original' => '_original',
      'thumbnail' => 'thumbnail',
      'preview' => 'preview',
    ),
    'validate_argument_node_type' => array(
      'test2' => 'test2',
      'image' => 0,
      'forum' => 0,      
      'test1' => 0,     
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '2' => 0,
      '7' => 0,
      '3' => 0,
      '1' => 0,
      '4' => 0,
      '5' => 0,
      '6' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_node_flag_name' => '*relationship*',
    'validate_argument_node_flag_test' => 'flaggable',
    'validate_argument_node_flag_id_type' => 'id',
    'validate_argument_user_flag_name' => '*relationship*',
    'validate_argument_user_flag_test' => 'flaggable',
    'validate_argument_user_flag_id_type' => 'id',
    'validate_argument_is_member' => 'OG_VIEWS_DO_NOT_VALIDATE_MEMBERSHIP',
    'validate_argument_group_node_type' => array(
      'class' => 0,
    ),
    'validate_argument_php' => '',
    'me_validate_user_restrict_roles' => 0,
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'operator' => '=',
    'value' => 1,
    'group' => 0,
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'relationship' => 'none',
    'expose_button' => array(
      'button' => 'Expose',
    ),
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'test2');
$handler->override_option('empty', 'No test2 info found ');
$handler->override_option('empty_format', '1');
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 20);
$handler->override_option('use_pager', '1');
$handler->override_option('distinct', 0);
$handler = $view->new_display('node_content', 'test2 view', 'node_content_1');
$handler->override_option('types', array(
  'test1' => 'test1',
));
$handler->override_option('modes', array(
  '0' => 'full',
));
$handler->override_option('argument_mode', 'token');
$handler->override_option('default_argument', '[field_ref-nid]');
$handler->override_option('show_title', 1);

CommentFileSizeAuthor
NC_DS_Qtab.jpg46.64 KBhosais

Comments

MhueD’s picture

This would explain something that is puzzling me...if I just push a 'node' to a QuickTab then a CCK field that is a reference node shows up. BUT, if I make a simple view for that same tab, and then use an argument to filter to that very same node, the node reference field disappears. I think that my example shows that this is a problem for the QT module's implementation of the Views hooks...doesn't it?