When node_save is called multiple times all nodes are made sticky. This happens when using workflow/triggers and node_save_action is called. As a result weight_nodeapi is called twice with $op "presave", the first call works as expected while the second always makes the node sticky.

CommentFileSizeAuthor
#1 weight-498042.patch843 byteshalstead

Comments

halstead’s picture

StatusFileSize
new843 bytes

This tiny change has fixed the problem for me but I don't know what other issues may be caused. Basically I'm preventing double encoding by only testing for sticky values of 0 or 1. If the sticky value is already -100, 100, -94, 94, or any "weighted" number no change is made.

dmudie’s picture

Thanks halstead. I was seeing this too with a workflow trigger publishing action (node_save_action). Your patch seems to work for me.

nancydru’s picture

Status: Active » Fixed

Thanks for the patch. In the future, mark it as "Needs review" and assign it to yourself.

@dmudie: You could have marked it as "Reviewed and tested".

Committed to 6.x-1.x-dev.

halstead’s picture

Assigned: Unassigned » halstead

Thanks for the tip NancyDru. I've reviewed the issue queue handbook. Hopefully I will be more helpful to maintainers now. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.