I get always zero user karma on profiles pages, maybe I'm missing something basic.

Modules installed and corresponding settings:

Module: voting api
setting: Tally results whenever a vote is cast

Module: extra voting forms
setting: allow karma for comments

Module: User Karma with votes on comments plugin
settongs:

Show karma in the user profile page
Create a "karma" attribute for a $user
On comments: Activate this karma method
How much karma will be assigned for each vote: 1

Issue"comment karma" (node view) works fine, "user karma" (profile view) is always zero, even after cron run other mass recalculation of user karma. I'll appreciate any support

Comments

mercmobily’s picture

Hi,

Please:

* Tick "User Karma debug messages"
* Disable Javascript in your browser
* Vote for a comment
* Read the debug information
* Report it here.

Thanks!

Merc.

federico’s picture

Thanks mercmobily,

My info:

Action: vote on comment of user 726:
Info:

    * Thank you for voting!
    * DEBUG: User karma for 0: 0
    * DEBUG: User karma for 0: 0
    * DEBUG: User karma for 0: 0
    * DEBUG: User karma for 726: 0

Karma for comment: 1

Action: go to profile of user 726:

Info:

    * DEBUG: User karma for 726: 0
    * DEBUG: User karma for 726: 0
    * DEBUG: User karma for 726: 0
    * DEBUG: User karma for 726: 0
    * DEBUG: User karma for 726: 0
    * DEBUG: User karma for 726: 0

Karma for user: 0

Action: mass recalculation of user karma

Info:
[...]

DEBUG: Calculating karma (MASS) for 726
# DEBUG: In 'user_karma_calculate_karma'
# DEBUG: In 'user_karma_receive_vote_comment_user_karma_partial'
# DEBUG: 90
# DEBUG: Variable content_types_sql is: comment
# DEBUG: Variable value_types_sql is: points
# DEBUG: Query: SELECT SUM(vv.value) FROM {votingapi_vote} vv LEFT JOIN {comments} c ON vv.content_id = c.cid WHERE vv.content_type in ('comment') AND vv.value_type in ('points') AND c.uid = %d AND c.timestamp > (1208024763 - 7776000)
# DEBUG: Returning karma: 1
# DEBUG: User karma for 726: 1

[...]

Action: go to profile of user 726:

Info:

    * DEBUG: User karma for 726: 1
    * DEBUG: User karma for 726: 1
    * DEBUG: User karma for 726: 1
    * DEBUG: User karma for 726: 1
    * DEBUG: User karma for 726: 1
    * DEBUG: User karma for 726: 1

Karma for user: 1

So now it seems to work after mass recalculation for user karma. Now the question is: User Karma is calculated only after pressing that button or is there another problem here?

Thanks,

Fede

mercmobily’s picture

Hi,

Please attach _all_ of the debug string. From what I am seeing, you are only adding here chunks, and it's hard to follow.

Also, is this user 726 voting for a comment written by Anonymous? If so, please keep in mind that user 0 cannot get Karma.

The messages I see are not consistent with what they should be. Can you send a screenshot of your configuration?

Also, which voting form are you using?

Merc.

federico’s picture

StatusFileSize
new13.18 KB
new194.8 KB
new37.8 KB
new43.89 KB
new523.49 KB

Hi,

The debug strings are complete except the string after mass user karma recalculation, because it's quite long. Now I attach a txt with debug string of mass user karma recalculation after user 1 vote on user 835.

In the old message it was user 1 voting on user 726.

I attach screenshots of configurations.

I'm using Extra Voting Forms module.

Thanks,

Fede

mercmobily’s picture

Hi,

I can't debug this because your messages just don't seem to make sense...
Especially this one, which is puzzling to say the least:

* Thank you for voting!
* DEBUG: User karma for 0: 0
* DEBUG: User karma for 0: 0
* DEBUG: User karma for 0: 0
* DEBUG: User karma for 726: 0

Why would that message come out for anonymous? It's as if you cast a vote on a comment posted by anonymous...

Are you able to send me the admin login/pass to merc followed by "mobily1" . com?

Bye,

Merc.

mercmobily’s picture

Hi,

If you do send me login/pass, please also send me the exact steps to reproduce this problem!
(With all of the details! User ids, etc.)

Merc.

federico’s picture

Status: Active » Postponed

Hi,

* Thank you for voting!
* DEBUG: User karma for 0: 0
* DEBUG: User karma for 0: 0
* DEBUG: User karma for 0: 0
* DEBUG: User karma for 726: 0

I think that I (user 1) voted on a comment of user 726 on a forum topic where also three anonymous have commented, settings are so that you don't get karma when you vote, only when a comment of you authorship is voted (+1 or -1).

Module is only on localhost for testing, so it doesn't really matter, I'll wait for another release to implement User Karma on the live site. I've set issue status to postponed, if it gets solved. i'll post it here (you can close it if necessary).

Anyway, thanks for your interest in solving this issue.

Fede

mercmobily’s picture

Status: Postponed » Closed (won't fix)

Hi,

Federico, this is not going to be magically fixed in a future release...
As much as I would love to get this fixed (if there is indeed a problem).

I have run, again, some serious testing on user_karma, and can only confirm that everything works 1000% fine here. So, I will assume that this is a problem with your particular install, and will mark this as won't fix.

Merc.