user 1 not recognized
IceCreamYou - January 9, 2008 - 05:55
| Project: | Simple Karma |
| Version: | 5.x-1.15 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
So I realize this module isn't really being maintained anymore since it got split up, but I still like using it because this single module makes my life... simple. :)
Anyway, user 1 doesn't show up on the Users by Karma page, and I get this error on the occasional random page:
user warning: Unknown column 'event' in 'where clause' query: SELECT SUM(points) from userpoints_txn WHERE event='karma' and uid=1 and reference = 'karma; oid: 184, otype: n, uid: 6' in [full path removed]/public_html/includes/database.mysql.inc on line 172.Ideas? Thanks.

#1
Hi,
After a few weeks of improvements to the "new" three modules, I really advise against using this module. Seriously!
The only missing feature in the new module is the Userpoint interfacing, which was a bit of a disaster.
How can I help? Well, it's a little awkward, because the module is now completely unsupported, and I don't even have the sources here (!).
Anyhow, to answer your question :-D
Change this line:
$query='SELECT * FROM {users} u LEFT JOIN {simple_karma_cache} skc ON (u.uid = skc.oid AND skc.otype = \'u\') WHERE u.uid <> 0 AND u.uid <> 1 ORDER BY skc.karma DESC';
Into this:
$query='SELECT * FROM {users} u LEFT JOIN {simple_karma_cache} skc ON (u.uid = skc.oid AND skc.otype = \'u\') WHERE u.uid <> 0 ORDER BY skc.karma DESC';
Bye!
Merc.
#2
I made the change you suggested. I still occasionally get this error (I think it's the same) and it seems to occur on completely random pages and only every once in a while.
user warning: Unknown column 'event' in 'where clause' query: SELECT SUM(points) from userpoints_txn WHERE event='karma' and uid=1 and reference = 'karma; oid: 185, otype: n, uid: 1' in [full path removed]/public_html/includes/database.mysql.inc on line 172.Thoughts--other than that I should upgrade? ;)
I'll upgrade one of these days. In the mean time Simple Karma is working just fine for me other than this and it's simpler to fix it than upgrade at this point.
#3
Hi,
Hummm this seems to be a problem with userpoints rather than simple_karma!
Merc.
#4
Really? It looks to me like it's resulting from Simple Karma trying to give Userpoints...
Regardless, I've only had once incident of the error occurring in the past several days, and it happened right after I made the change, so it's possible my cache wasn't cleared or something similar.
Anyway, the problem seems to be solved now. Thanks for your help.
#5
Hi,
No worries!
Merc.