I've got the Spam-2.1.3 module installed in Drupal 4.7 and when attempting to mass delete several spam comments I get the following warnings:
# warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/chicagoc/www/www/includes/database.mysql.inc on line 349.
# user warning: Unknown column 'n.revision_timestamp' in 'where clause' 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 n.nid = '878' AND n.vid = '910' AND n.type = 'forum' AND n.status = '0' AND n.created = '1156328126' AND n.changed = '1156328126' AND n.comment = '2' AND n.promote = '0' AND n.moderate = '0' AND n.sticky = '0' AND n.revision_timestamp = '1156328126' AND n.title = 'prepared' AND n.body = 'Hello, this site is very nice, i loved it. my sites:\r\n [url=http://phenterminebuy.gjjgt.info/phentermine-medication.html]phentermine medication[/url] [url=http://tramadolbuy.klpll.info/tramadol-sales.html]tr in /home/chicagoc/www/www/includes/database.mysql.inc on line 120.
This looks to be throwing the error on node_load() called in the spam_delete_node() function. That's as far as I got.
Anyone else had this problem? Anyone know of a workaround/bugfix?
Thanks!
Comments
same problem, no fix, manual workaround
I too have the same problem, so hoping there is some fix for this soon!
My workaround is to edit the topic in Drupal, and use the Drupal delete button that shows up on the bottom of the post. This is very slow, so hoping there is a fix for this I can apply.
unable to duplicate
I was unable to duplicate this. I installed Drupal 4.7.3 and spam module 2.1.4, then selected three spam comments and deleted them from the adminstrative page at admin/comment/list/spam without any errors.
node_delete expects a nid as paramter
Hello,
I did not look into the Spam module, but the last time I saw this error message was, while having the assumption that node_delete (which calls node_load) expects a node object as parameter. Unlike node_save, node_delete likes to have a nid.
--
~/.singatrue: file not found
Traxer is spot on here I
Traxer is spot on here I think. In the version of the module I have, inside "function spam_delete_node($nid)", we have on line 3025
node_delete((array)$node);
Change it to
node_delete($nid);
And all seems fine, spam is deleted appropriately and no errors come up (or at least in my 2-minute testing :-) ).
The reason you might not see the error when deleting comments specifically is that that function isn't used, there is a seperate function spam_delete_comment function which handles that.
Hope that helps, no guarentees of safety etc. :-)
Mass deletion of all comments but the first 30
I just had a user delete a single spam comment, and then have most of the comments deleted, spam or not (I have a backup, fortunately, but the user was pretty upset with themselves.)
The comments and the node tables both check without error. There are no SQL errors in the logs.
Any thoughts? Is there any likelihood that node_delete((array)$node) is causing this behavior?
I'm using spam 2.1.4 in Drupal 4.7.1.
UPDATE We're a group blog. What would happen if two users, in different sessions, deleted the same comment at exactly the same time?
Mass delete problem in spam module
I have the same problem and I dont know what can I do
Give a try to views_bulk_operations
Hi
I didn't try the spam module, but used instead the View bulk operations module.
This module allows to create a custom view with filters, ad then you can enable a "delete" operation on every element of the view.
Pretty much generic and configurable, but take care of your PHP.ini max execution time
(can be altered in sites/settings.php with
ini_set("max_execution_time", "300");for example.