Closed (fixed)
Project:
Userpoints Node Action
Version:
6.x-1.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
15 May 2011 at 16:46 UTC
Updated:
17 Sep 2011 at 14:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
psy11 commentedUser lost points on each node update
Comment #2
psy11 commentedTried to use without workflow, just by publishing checkbox. Same problem in case was publishing on new save charge points off.
Comment #3
BillyMG commentedStrange, I was unable to duplicate this. In a blank environment, I created a new node that required X points to publish. When I unpublished that note, it did not charge me. Can you provide screenshots or any other information that may help me to see why your environment might be different?
Comment #4
psy11 commentedI have made a new clean install to test userpoint node action. Yes, on unpublish it does not charge of points, but on update it's do. If I go to edit page and after press save, it takes same points like publish. It's dificulte to use, because user all times want's to modify own content and never want's to pay twice. Is the way to not charge off on update?
In two days I will try node action with workflow.
Comment #5
psy11 commenteduserpoints_node_action.module
// Users shouldn't have to pay again if they're just editing the node, and didn't change the action.
It is not work at me.
After updating (action not changed) I got:
Comment #6
psy11 commentedHope somebody helps me...
I tried this on clean install. Modules are: block, color, comment, contact, dblog, filter, help, menu, node, php, system, taxonomy, update, user, content, content_permissions, number, optionwidgets, text, filefield, override_node_options, rules_admin, rules_scheduler, userpoints, userpoints_rules, userpoints_node_action, fieldgroup, rules, rules_forms.
Problem: On update charge of points. Look please screenshots:
Comment #7
psy11 commentedWhat's matter with this func?
function _userpoints_node_action_has_status_changed($nid, $action, $newStatus = 1) {
// It seems the only reliable way to do this is to reload the node. It could be a direct
// query to the node table, but node_load would be more resistant to change.
// If the nid is empty, it's because they're making a new node
if (empty($nid)) {
return true;
}
$node = node_load($nid);
// Oops? Must be a problem, return true by default;
Comment #8
BillyMG commentedI wasn't able to duplicate your exact issue, and I'm still unsure of exactly what the problem is. However, I've done some research and found an issue with the new code. If you wouldn't mind, please replace the code with 6.x-1.x (make sure it was updated around today or so). The new DEV code should hopefully solve your problem. If not, any chance your server happens to be public? I'm more than glad to do what I can to help out.
Comment #9
psy11 commentedSOLVED:
in func:
function _userpoints_node_action_get_actions() {}
was:
USERPOINTS_NODE_ACTION_PUBLISH => 'Publish',
USERPOINTS_NODE_ACTION_STICKY => 'Sticky',
USERPOINTS_NODE_ACTION_PROMOTE => 'Promote',
unchecked->checked => charge off
checked->checked=> charge off again
I did:
USERPOINTS_NODE_ACTION_PUBLISH => 'status',
USERPOINTS_NODE_ACTION_STICKY => 'sticky',
USERPOINTS_NODE_ACTION_PROMOTE => 'promote',
All works, like I want now.
unchecked->checked => charge off
checked->checked=> nothing
checked->unchecked=> nothing
again
unchecked->checked => charge off
And now it's no return true by default. If You think I'm right, correct code
Comment #10
BillyMG commentedCan you please try the DEV version instead? The bug was somewhere else and that section of the code works as it is supposed to. If that doesn't help, then I'll probably implement your change and make sure it doesn't affect other code.
Comment #11
BillyMG commentedI believe this issue was fixed in the dev release placed in that date. As such, I'm going to mark this as fixed. Please re-open if necessary.