In my system this happens:

* Initial user points is 0
* User creates a node and earn 10 points for that (not immediately, moderated - I have AutoApprove to approve all points 3 days later)
* User deletes this node (and I have activated that node deleted, user looses its points)
* In Watchdog I receive a warning that a user should lost 10 points, but he can't go negative so he is still 0;
* In moderation tab it's still have 10 points to be approved from this node (even if there isn't it anymore).
* If I don't take any action, that 10 points will be approved to the user for a content that no longer exists.

I think this may be a conceptual bug, since I couldn't revert it (I need to go in moderation and delete all awaiting points that has nodes deleted), but I marked it as a support for a while because maybe there is something I'm not seeing.

Thanks!

Comments

kbahey’s picture

Version: 5.x-3.7 » 5.x-3.x-dev
Component: Code: userpoints API » Code: userpoints_basic
Category: support » bug

I think this is a bug.

userpoints_basic needs to check in hook_nodeapi($op = 'delete') and delete any pending (in moderation) transactions regarding that node if the node gets deleted.

This also needs to happen for other things like comments, ...etc.

It is kind of complicated to do this properly. Patches welcome.

berdir’s picture

Status: Active » Closed (won't fix)

Sorry for spamming the participants in this issue. Due to the release of Drupal 7 and the lack of time from the maintainers, I'm closing all remaining 5.x issues for Userpoints.

Feel free to re-open this issue or create a new one for 6.x or even better 7.x if this bug is still open or feature is missing for these versions.