Closed (duplicate)
Project:
User Points
Version:
6.x-1.x-dev
Component:
Code: userpoints_views
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Jan 2011 at 20:36 UTC
Updated:
25 Jan 2011 at 09:39 UTC
Jump to comment: Most recent file
Comments
Comment #1
socialnicheguru commentedusing node view.
Comment #2
socialnicheguru commentedHere is an example view
$view = new view;
$view->name = 'userpoint_test';
$view->description = 'Userpoints views error- for each point in a category (tid) the results are repeated.';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'users';
$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(
'uid' => array(
'id' => 'uid',
'table' => 'userpoints',
'field' => 'uid',
),
));
$handler->override_option('fields', array(
'name' => array(
'label' => 'Name',
'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_user' => 1,
'overwrite_anonymous' => 0,
'anonymous_text' => '',
'exclude' => 0,
'id' => 'name',
'table' => 'users',
'field' => 'name',
'relationship' => 'none',
),
'points_1' => array(
'label' => 'Points',
'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' => 1,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'points_1',
'table' => 'userpoints_txn',
'field' => 'points',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'description' => array(
'id' => 'description',
'table' => 'userpoints_txn',
'field' => 'description',
),
'entity_type' => array(
'id' => 'entity_type',
'table' => 'userpoints_txn',
'field' => 'entity_type',
),
'operation' => array(
'id' => 'operation',
'table' => 'userpoints_txn',
'field' => 'operation',
),
'reference' => array(
'id' => 'reference',
'table' => 'userpoints_txn',
'field' => 'reference',
),
'status' => array(
'label' => 'Status',
'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' => 1,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'status',
'table' => 'userpoints_txn',
'field' => 'status',
'relationship' => 'none',
),
'time_stamp' => array(
'id' => 'time_stamp',
'table' => 'userpoints_txn',
'field' => 'time_stamp',
),
'tid_1' => array(
'id' => 'tid_1',
'table' => 'userpoints_txn',
'field' => 'tid',
),
'phpcode' => array(
'label' => 'Timestamp',
'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,
'value' => '
',
'sortable' => '1',
'exclude' => 1,
'id' => 'phpcode',
'table' => 'customfield',
'field' => 'phpcode',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'uid' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'breadcrumb' => '',
'default_argument_type' => 'user',
'default_argument' => '',
'validate_type' => 'me',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'6' => 0,
'3' => 0,
'4' => 0,
'5' => 0,
'7' => 0,
'8' => 0,
'14' => 0,
'9' => 0,
'13' => 0,
'10' => 0,
'11' => 0,
'12' => 0,
),
'me_redirect' => 1,
'me_validate_user_argument_type' => 'either',
'me_validate_user_roles' => array(
'2' => 0,
'6' => 0,
'3' => 0,
'4' => 0,
'5' => 0,
'7' => 0,
'8' => 0,
'14' => 0,
'9' => 0,
'13' => 0,
'10' => 0,
'11' => 0,
'12' => 0,
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_fixed' => '',
'default_argument_user' => 0,
'default_argument_php' => '',
'validate_argument_node_type' => array(
'poll' => 0,
'blog' => 0,
'book' => 0,
'group' => 0,
'shoutbox' => 0,
'feed_fast' => 0,
'feed' => 0,
'feed_item' => 0,
'live_event' => 0,
'socialnicheguru_event_feed' => 0,
'socialnicheguru_makemeeting' => 0,
'socialnicheguru_todo' => 0,
'socialnicheguru_todo_project' => 0,
'chatroom' => 0,
'chat' => 0,
'product' => 0,
'socialnicheguru_conference_room' => 0,
'socialnicheguru_event' => 0,
'socialnicheguru_booking' => 0,
'socialnicheguru_role_product' => 0,
'socialnicheguru_role_product2' => 0,
'uc_recurring_subscription' => 0,
'audio' => 0,
'v2wvc' => 0,
'panel' => 0,
'activitystream' => 0,
'graphmind' => 0,
'mass_contact' => 0,
'simplenews' => 0,
'socialnicheguru_location' => 0,
'socialnicheguru_profile' => 0,
'socialnicheguru_profile_career' => 0,
'socialnicheguru_profile_edu' => 0,
'socialnicheguru_profile_interest' => 0,
'socialnicheguru_profile_service' => 0,
'socialnicheguru_todo_project_grp' => 0,
'socialnicheguru_video' => 0,
'socialnicheguru_video_comment' => 0,
'topichub' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'158' => 0,
'159' => 0,
'298' => 0,
'338' => 0,
'143' => 0,
'160' => 0,
'299' => 0,
'300' => 0,
'301' => 0,
'302' => 0,
'303' => 0,
'154' => 0,
'304' => 0,
'305' => 0,
'153' => 0,
'156' => 0,
'152' => 0,
'339' => 0,
'306' => 0,
'307' => 0,
'150' => 0,
'308' => 0,
'149' => 0,
'148' => 0,
'147' => 0,
'146' => 0,
'210' => 0,
'309' => 0,
'137' => 0,
'204' => 0,
'341' => 0,
'206' => 0,
'343' => 0,
'205' => 0,
'342' => 0,
'203' => 0,
'340' => 0,
'1' => 0,
'310' => 0,
'311' => 0,
'312' => 0,
'313' => 0,
'314' => 0,
'315' => 0,
'316' => 0,
'317' => 0,
'231' => 0,
'296' => 0,
'207' => 0,
'318' => 0,
'319' => 0,
'138' => 0,
'320' => 0,
'145' => 0,
'321' => 0,
'144' => 0,
'322' => 0,
'323' => 0,
'324' => 0,
'325' => 0,
'326' => 0,
'327' => 0,
'328' => 0,
'329' => 0,
'142' => 0,
'4' => 0,
'337' => 0,
'141' => 0,
'330' => 0,
'331' => 0,
'332' => 0,
'333' => 0,
'140' => 0,
'334' => 0,
'335' => 0,
'155' => 0,
'157' => 0,
'336' => 0,
'2' => 0,
'211' => 0,
'139' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_is_member' => 'OG_VIEWS_DO_NOT_VALIDATE_MEMBERSHIP',
'validate_argument_group_node_type' => array(
'group' => 0,
),
'validate_argument_signup_status' => 'any',
'validate_argument_signup_node_access' => 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_php' => '',
'me_validate_user_restrict_roles' => 0,
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('footer_format', '4');
$handler->override_option('footer_empty', 0);
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'grouping' => 'time_stamp',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'name' => 'name',
'points_1' => 'points_1',
'description' => 'description',
'entity_type' => 'entity_type',
'operation' => 'operation',
'reference' => 'reference',
'status' => 'status',
'time_stamp' => 'time_stamp',
'tid_1' => 'tid_1',
'phpcode' => 'phpcode',
),
'info' => array(
'name' => array(
'sortable' => 0,
'separator' => '',
),
'points_1' => array(
'sortable' => 1,
'separator' => '',
),
'description' => array(
'separator' => '',
),
'entity_type' => array(
'separator' => '',
),
'operation' => array(
'separator' => '',
),
'reference' => array(
'separator' => '',
),
'status' => array(
'separator' => '',
),
'time_stamp' => array(
'separator' => '',
),
'tid_1' => array(
'separator' => '',
),
'phpcode' => array(
'sortable' => 0,
'separator' => '',
),
),
'default' => 'points_1',
));
Comment #3
soulfroysSame problem here... even with node:
Comment #4
soulfroysEven this simple view do not show category properly, any help? I using:
Drupal 6.14,
Views 6.x-2.11 and
Userpoints 6.x-1.x-dev (2011-01-02).
I move it to "major", since category it's a very important feature (did I make a right move?)
Comment #5
soulfroysSame problem with fresh Drupal 6.20 and userpoints/views last dev...
Comment #6
berdirSee #871126: Fix Bugs in Views Integration. Looks like I will have to backport the patch there.