Yikes! one vote gave a user 890 points!

I gave a user a plus for a good question but it awarded them 890 points! That seems a bit excessive, don't ya think?

-C

  • cshrimpt

    It seems to be adding random amounts to other accounts as well. One account that had 27 points now has 127 and one that has 37 points now has 337. When I down vote the account with 890 points it goes to zero, down arrow again and it goes to -396. Up vote and it's back to 890. Does that pattern of numbers have any significance in the plugin?

    Also, the vote and point displays don't play well with W3 Total Cache. Caching seems to exacerbate the problem.

    Where and how are the votes and points stored? I'd like to look in the database and see what is actually in there. This is to verify this isn't some strange display problem.

    BTW: The plugin is great. Just a few oddities left.

    Craig

  • cshrimpt

    To help you debug. I have included some tests for you to show you what it's doing. It looks like the multiplier is screwed up in some fashion.
    If you want me to help debug, I'd be happy to do it.

    Looked at the up votes for users. There were no down votes. The post in question is 178

    mysql> select * from wp_postmeta where meta_key = '_up_vote';
    +---------+---------+----------+------------+
    | meta_id | post_id | meta_key | meta_value |
    +---------+---------+----------+------------+
    | 12 | 12 | _up_vote | 2 |
    | 54 | 26 | _up_vote | 2 |
    | 89 | 38 | _up_vote | 1 |
    | 426 | 15 | _up_vote | 1 |
    | 946 | 178 | _up_vote | 2 |
    +---------+---------+----------+------------+
    5 rows in set (0.00 sec)

    User in question is user 3

    mysql> select * from wp_usermeta where meta_value = 'hannah';
    +----------+---------+------------+------------+
    | umeta_id | user_id | meta_key | meta_value |
    +----------+---------+------------+------------+
    | 46 | 3 | first_name | Hannah |
    | 48 | 3 | nickname | Hannah |
    +----------+---------+------------+------------+
    2 rows in set (0.00 sec)

    Found the errant rep of 890

    mysql> select * from wp_usermeta where meta_value = 890;
    +----------+---------+----------+------------+
    | umeta_id | user_id | meta_key | meta_value |
    +----------+---------+----------+------------+
    | 235 | 3 | _qa_rep | 890 |
    +----------+---------+----------+------------+
    1 row in set (0.00 sec)

    Added Up vote for user

    mysql> select * from wp_postmeta where meta_key = '_up_vote';
    +---------+---------+----------+------------+
    | meta_id | post_id | meta_key | meta_value |
    +---------+---------+----------+------------+
    | 12 | 12 | _up_vote | 2 |
    | 54 | 26 | _up_vote | 2 |
    | 89 | 38 | _up_vote | 1 |
    | 426 | 15 | _up_vote | 1 |
    | 946 | 178 | _up_vote | 2 |
    | 948 | 178 | _up_vote | 1 |
    +---------+---------+----------+------------+
    6 rows in set (0.00 sec)

    Up vote recorded but _qa_rep still at 890

    mysql> select * from wp_postmeta where meta_key = '_up_vote';
    +---------+---------+----------+------------+
    | meta_id | post_id | meta_key | meta_value |
    +---------+---------+----------+------------+
    | 12 | 12 | _up_vote | 2 |
    | 54 | 26 | _up_vote | 2 |
    | 89 | 38 | _up_vote | 1 |
    | 426 | 15 | _up_vote | 1 |
    | 946 | 178 | _up_vote | 2 |
    +---------+---------+----------+------------+
    5 rows in set (0.00 sec)

    Unclick up vote recorded...but..

    mysql> select * from wp_usermeta where user_id = 3;
    +----------+---------+------------------------+----------------------------------+
    | umeta_id | user_id | meta_key | meta_value |
    +----------+---------+------------------------+----------------------------------+
    | 46 | 3 | first_name | Hannah |
    | 47 | 3 | last_name | |
    | 48 | 3 | nickname | Hannah |
    | 49 | 3 | description | |
    | 50 | 3 | rich_editing | true |
    | 51 | 3 | comment_shortcuts | false |
    | 52 | 3 | admin_color | fresh |
    | 53 | 3 | use_ssl | 0 |
    | 54 | 3 | show_admin_bar_front | true |
    | 55 | 3 | show_admin_bar_admin | false |
    | 56 | 3 | aim | |
    | 57 | 3 | yim | |
    | 58 | 3 | jabber | |
    | 59 | 3 | wp_capabilities | a:1:{s:10:"subscriber";s:1:"1";} |
    | 60 | 3 | wp_user_level | 0 |
    | 62 | 3 | last_activity | 2011-05-04 23:30:18 |
    | 156 | 3 | bp_favorite_activities | a:0:{} |
    | 235 | 3 | _qa_rep | 890 |
    +----------+---------+------------------------+----------------------------------+
    18 rows in set (0.00 sec)

    _qa_rep still at 890.

    mysql> select * from wp_postmeta where meta_key = '_down_vote';
    +---------+---------+------------+------------+
    | meta_id | post_id | meta_key | meta_value |
    +---------+---------+------------+------------+
    | 949 | 178 | _down_vote | 1 |
    +---------+---------+------------+------------+
    1 row in set (0.00 sec)

    down vote also recorded..

    mysql> select * from wp_usermeta where user_id = 3;
    +----------+---------+------------------------+----------------------------------+
    | umeta_id | user_id | meta_key | meta_value |
    +----------+---------+------------------------+----------------------------------+
    | 46 | 3 | first_name | Hannah |
    | 47 | 3 | last_name | |
    | 48 | 3 | nickname | Hannah |
    | 49 | 3 | description | |
    | 50 | 3 | rich_editing | true |
    | 51 | 3 | comment_shortcuts | false |
    | 52 | 3 | admin_color | fresh |
    | 53 | 3 | use_ssl | 0 |
    | 54 | 3 | show_admin_bar_front | true |
    | 55 | 3 | show_admin_bar_admin | false |
    | 56 | 3 | aim | |
    | 57 | 3 | yim | |
    | 58 | 3 | jabber | |
    | 59 | 3 | wp_capabilities | a:1:{s:10:"subscriber";s:1:"1";} |
    | 60 | 3 | wp_user_level | 0 |
    | 62 | 3 | last_activity | 2011-05-04 23:30:18 |
    | 156 | 3 | bp_favorite_activities | a:0:{} |
    | 235 | 3 | _qa_rep | 534 |
    +----------+---------+------------------------+----------------------------------+
    18 rows in set (0.00 sec)

    Users's _qa_rep now at 534

    Then logged in as different user clicked down vote again

    mysql> select * from wp_postmeta where meta_key = '_down_vote';
    +---------+---------+------------+------------+
    | meta_id | post_id | meta_key | meta_value |
    +---------+---------+------------+------------+
    | 952 | 178 | _down_vote | 2 |
    | 951 | 178 | _down_vote | 1 |
    +---------+---------+------------+------------+
    2 rows in set (0.00 sec)

    mysql> select * from wp_usermeta where user_id = 3;
    +----------+---------+------------------------+----------------------------------+
    | umeta_id | user_id | meta_key | meta_value |
    +----------+---------+------------------------+----------------------------------+
    | 46 | 3 | first_name | Hannah |
    | 47 | 3 | last_name | |
    | 48 | 3 | nickname | Hannah |
    | 49 | 3 | description | |
    | 50 | 3 | rich_editing | true |
    | 51 | 3 | comment_shortcuts | false |
    | 52 | 3 | admin_color | fresh |
    | 53 | 3 | use_ssl | 0 |
    | 54 | 3 | show_admin_bar_front | true |
    | 55 | 3 | show_admin_bar_admin | false |
    | 56 | 3 | aim | |
    | 57 | 3 | yim | |
    | 58 | 3 | jabber | |
    | 59 | 3 | wp_capabilities | a:1:{s:10:"subscriber";s:1:"1";} |
    | 60 | 3 | wp_user_level | 0 |
    | 62 | 3 | last_activity | 2011-05-04 23:30:18 |
    | 156 | 3 | bp_favorite_activities | a:0:{} |
    | 235 | 3 | _qa_rep | -356 |
    +----------+---------+------------------------+----------------------------------+
    18 rows in set (0.00 sec)

    User's rep now displays -356

    Pretty odd.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.