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

eaton - May 1, 2006 - 17:07

What other modules are you using on the site? Any node access modules?

#2

coplan - May 20, 2006 - 00:06

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

coplan - May 20, 2006 - 00:07

I also updated to 4.7 final...still no luck.

#4

coplan - May 20, 2006 - 00:12

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

coplan - May 20, 2006 - 00:17

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

coplan - July 12, 2006 - 21:38

Any new developments on this issue?

#7

yched - February 16, 2007 - 19:01
Status:active» needs review

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 :-) )

AttachmentSize
nmoderation.module_0.patch 1.46 KB

#8

Pxtl - February 27, 2007 - 02:18

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?

 
 

Drupal is a registered trademark of Dries Buytaert.