On the comments moderation page, I have a bunch of spam messages waiting in my queue. I select some spam messages and try "mark the selected comments as spam," and click update, but nothing happens. I check the logs and there is nothing there. Any idea what's causing the problem?

Comments

jeremy’s picture

Assigned: Unassigned » jeremy

All bulk operations appear to be broken on that page. Reviewing now.

jeremy’s picture

Status: Active » Fixed

This was caused by some an anti-looping kludge. While I've not dove into the looping, I enhanced it so that we can perform multi-node operations (which were being detected as looping).

Fix committed to the 5.x and 6.x branches.

Status: Fixed » Closed (fixed)

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

miss-susan’s picture

Status: Closed (fixed) » Active

Hey, I just downloaded and installed the lasted development snapshot, and I don't believe this fixed the problem. Can somebody run through and test again?

Also, in v3.0 beta1, if I have comments in the approval queue that I want to mark as spam, clicking "mark the selected comments as spam" doesn't do anything. This is different from trying to mark published comments as spam. When I try to mark multiple published comments as spam, only the first one is marked.

Let me know if you need more details on anything. Awesome module otherwise!

(Sorry if I wasn't supposed to reopen the issue this way, I don't have a lot of experience with the bug tracking system)

gnassar’s picture

Just to make sure: you're testing on Drupal 5.x?

jeremy’s picture

Status: Active » Fixed

I'm unable to duplicate -- and, I recommend upgrading to Drupal 6 as that's where our primary development efforts are focused. Closing issue as it works in my testing, feel free to re-open if you're still having a problem.

Status: Fixed » Closed (fixed)

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

grndlvl’s picture

Version: 5.x-3.x-dev » 5.x-3.0-beta1
Status: Closed (fixed) » Needs review

I also had this same issue. It seemed to be a combination of 1 the anti-looping kludge keeping from marking more than 10 comments as spam from the "published" queue and comments were completely unable to be marked as spam from the approval queue. I have provided a patch that excludes the call from the comment_admin_overview form.

Fix for loop for comment_admin_overview form

@@ -1661,7 +1661,7 @@ function spam_links($type, $id, $content
 function spam_mark_as_spam($type, $id, $extra = array()) {
   // TODO: Fix this loop
   static $loop = FALSE;
-  if ($loop) {
+  if ($loop && !$extra['comment_admin_overview']) {

Fix for comments not being able to be marked as spam from the approval queue.

@@ -197,7 +197,7 @@ function comment_spamapi($op, $arg1 = NU
     case 'unpublish':
       // Only update comments that exist and need to be unpublished.
       // When 'unpublishing' comments, we actually mark them as spam.
-      $nid = db_result(db_query('SELECT nid FROM {comments} WHERE cid = %d AND status = %d', $arg1, COMMENT_PUBLISHED));
+      $nid = db_result(db_query('SELECT nid FROM {comments} WHERE cid = %d AND (status = %d || status = %d)', $arg1, COMMENT_PUBLISHED, COMMENT_NOT_PUBLISHED));
gnassar’s picture

Version: 5.x-3.0-beta1 » 5.x-3.x-dev
Status: Needs review » Closed (fixed)

This is already fixed in the more recent 5.x-3.x-dev build. That is probably the one that should be used instead of the currently published beta1.

alberto56’s picture

Version: 5.x-3.x-dev » 6.x-1.0
Category: support » bug
Status: Closed (fixed) » Active

Hi there,

I'm reopening this thread because I'm getting this problem with spam 6.x-1.0.

- Activate spam and all filters
- Receive a bunch of spam
- Go to content/comment/approval
- Select any number of messages (1 or all)
- Select "Mark the selected comments as spam" in the operations list, then submit
- A green message appears: "The update has been performed."
- However, and this is unexpected, the selected messages remain in the approval queue, and the list admin/content/comment/list/spam is empty (No comments available.)
- There is nothing at all in admin/reports/dblog

Cheers,

Albert.

alberto56’s picture

Hi again, I'm confirming that the above scenario happens even on a brand new Drupal 6.19 installation with only the spam module enabled (no filters).

gnassar’s picture

Status: Active » Closed (duplicate)