Can't Delete Votes
coplan - April 24, 2006 - 16:46
| Project: | Node Moderation |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I want to delete a node moderation vote assocated with a specific node. I tried deleting it from the node's vote history and I also tried deleting it from the admin panels. IN both cases, after I confirm the delete, I get the following error(s):
- warning: Invalid argument supplied for foreach() in /var/www/sites/antisoc.net/site/www/modules/node.module on line 359.
- warning: implode(): Bad arguments. in /var/www/sites/antisoc.net/site/www/modules/node.module on line 363.
- user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /var/www/sites/antisoc.net/site/www/includes/database.mysql.inc on line 120. I'm using Drupal 4.7-rc3 with the latest CVS version of node moderation module. I don't know what other information you may need to help troubleshoot.
Any thoughts?

#1
What other modules are you using on the site? Any node access modules?
#2
Sorry for the slow reply.
I'm using the following modules (I'll just post them all):
adsense
article
bbcode
block
book
comment
contact
drupal
flexinode
forum
freelinking
help
legacy
menu
nmoderation (duh)
path
ping
poormanscron
porter-stemmer
profile
search
statistics
story
system
taxonomy
taxonomy context
taxonomy redirect
term (a hacked version of story)
tracker
userpoints
votingapi
watchdog
If it helps...the node I was trying to delete was a flexinode type.
#3
I also updated to 4.7 final...still no luck.
#4
Updated to the latest version of nmoderation, and now I get the following error when I try to delete:
Fatal error: Call to undefined function: votingapi_recalculate_results() in /var/www/sites/antisoc.net/site/www/modules/nmoderation/nmoderation.module on line 515#5
Wow...I really appologize for the excessive follow-ups. I keep getting ideas after I post.
Now I updated the voting-api, and I'm back to the same problem I had before. So I guess nothing has changed. Same error message.
#6
Any new developments on this issue?
#7
Attached patch fixed the 'votes are nor deleted bug', plus another subsequent bug when the only (last) vote on a node gets deleted, the node gets incorrectly unpublished (and promoted :-) )
#8
The scope is somewhat more severe: you cannot change _any_ node moderation. I have nodes I moderated up to the front page that I can't remove even with changing my vote to a 0-value vote, since I can't remove my + mod. - mods to Unpublish are similarly broken.
If I try to change a node moderation vote, it looks like everything worked, but nothing happens - no error is written to log, and the vote is not changed. The page just refreshes and the old vote is present.
Does the above patch solve this issue as well, or just the "can't delete" bug?