Error when deleting users - column 'event' in userpoints_txn

wotstheguts - March 7, 2008 - 07:56
Project:User Points Contributed modules
Version:5.x-3.x-dev
Component:Code: userpoints_invite
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I'm using Userpoints 5.x-3.3 and Userpoints Contrib 5.x-3.x-dev. (Sorry, I tried to list this bug report under "User Points Contributed Modules" but it wouldn't accept the component.)

The following error occurs whenever a user is deleted under admin/user/user:

user warning: Unknown column 'event' in 'where clause' query: SELECT uid FROM userpoints_txn WHERE event = 'invite register invited 173' ORDER BY time_stamp DESC LIMIT 1 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\includes\database.mysql.inc on line 172.

From this it looks like the "event" column in userpoints_txn was changed to "operation" at some point, and something was missed in the code.

Thanks,
Peter.

#1

kbahey - March 8, 2008 - 22:34
Status:active» duplicate

Druplicate of http://drupal.org/node/223364

#2

wotstheguts - March 9, 2008 - 05:47
Status:duplicate» active

Hi, with all respect, this is not a duplicate - the error message in 223364 is Unknown column 'upt.event' whereas my error message is Unknown column 'event'.

Furthermore, I'm using the Invite feature from Userpoints Contrib 5.x-3.x-dev, not 5.x-2.x. Following is copied and pasted from modules screen:

Userpoints 5.x-3.3 Users earn points as they post nodes, comments, and vote on nodes.
Userpoints Invite 5.x-3.x-dev Users earn points when they invite other, and when others register.

Regards,
Peter.

#3

jredding@drupal.org - March 9, 2008 - 07:57
Project:User Points» User Points Contributed modules
Version:5.x-3.3» 5.x-3.x-dev
Component:Code: userpoints API» Code: userpoints_invite

The reason why this is seen as a duplicate is because the column event doesn't exist in version 3 thus the code you're using hasn't been upgraded (hence the word "dev").

I'm classifying this correctly.
1) This is against user points contributed module, specifically userpoints_invite
2) This is against a dev version and not a stable version

unfortunately it appears that userpoints_invite hasn't been upgraded to version 3 yet (again its in Dev and hasn't been labeled as stable yet). If you have time I would urge you to get involved and try to upgrade the module yourself. At this point I'm not aware of a developer working on the contributed modules.

#4

crosas.gallardo - May 3, 2008 - 20:59

hi, the problem is the install and the invite.module(userpoits_contrib), this no create de event en db

SELECT uid FROM userpoints_txn WHERE event = 'invite register invited 173'

event not existing

fix

SELECT uid FROM userpoints_txn WHERE operation= 'invite register invited 173'

change event for operation then you no have this error and work 100%

#5

crosas.gallardo - May 3, 2008 - 21:01

this fix working userpoints_contrib-5.x-3.x-dev and userpoints-5.x-3.5 and invite-5.x-1.x-dev

#6

kbahey - May 4, 2008 - 15:38
Status:active» needs work

@crosas.gallardo

Can you please create a patch for this, as explained here http://drupal.org/patch

 
 

Drupal is a registered trademark of Dries Buytaert.