Fasttoggle and Userpoints problem

Fanaile - February 18, 2008 - 00:07
Project:Fasttoggle
Version:5.x-1.0
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Hi; My the web site I work on (ProgressiveU.org) uses the "Userpoints" Module to help determine winners for a scholarship that we hand out twice a year. I recently installed Fasttoggle just before this most recent scholarship competition started, but found that when the moderators used Fasttoggle to promote or unpublish a user's blog, that user was given more points, and then when Fasttoggle was used to unpromote or republish that blog again, more points were added.

For the time being, I've disabled Fasttoggle - as we can't allow the points to get too far out of whack. Any way I can fix this, or ideas on how to keep fasttoggle from giving points to users?

Thanks.

#1

Fanaile - February 22, 2008 - 04:55

*bump*

#2

kkaefer - February 22, 2008 - 08:51

I don't think that fasttoggle is adding points to users. I'm not familiar with the userpoints module, but is it possible that this is a behavior caused by this module? E.g. it may respond to URL requests it's not supposed to respond. Please try to find out what is different of when userpoints is installed.

#3

Fanaile - March 5, 2008 - 19:30

Actually, it is very much possible that the problem could be caused by the userpoints module. I presumed that it was fasttoggle because prior to my installing the fasttoggle module, we had no problems with the userpoints module.

I will submit a help request with them. Perhaps the two just don't like each other?

Thanks.

#4

jredding - March 16, 2008 - 18:17

I don't believe this issue is with userpoints_basic (the module that add/subtracts points).

userpoints_basic adds points via a hook_nodeapi on the "insert" operation add doesn't operate on any other operation. I noticed in the
fasttoggle_node_option() function that if the operation is done via POST then a node_save is done but if the submission is via javascript it has node set as the callback. If the option is "insert" (sent went with the callback) then the userpoints hook_nodeapi would be called again via an insert operation and thus more points added. If this is what is happening (sorry I haven't tested this hypothesis yet) then the "bug" would be with fasttoggle as its incorrectly calling the hook with an insert call.

Can someone exhibiting this behavior throw a debug statement in userpoints_basic.module in hook_nodeapi to display which $op is being acted upon and also a debug statement in fasttoggle.module around line 385 (in the dev version) to display what the option is being went with the drupal_to_js call (there is only one drupal_to_js function call in the node_option function).

#5

kkaefer - November 28, 2009 - 11:50
Status:active» postponed (maintainer needs more info)

Is this still an issue?

 
 

Drupal is a registered trademark of Dries Buytaert.