Download & Extend

Will hide comments but not original node

Project:abuse
Version:6.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I have the most recent version of abuse installed (aug1 release) on Drupal 6.3 I have a role set for moderators to directly flag content as abusive so it will disappear. This works perfectly for comments, but if the original node is flagged as abusive by one of the moderators, it still remains visible for all to see. The flag does show in the moderate list, but the action does not hide it automatically. Please advise.

Comments

#1

Hmm...I change the status of the node to -1 when an admin flags it - it should not get displayed by the system at that stage. I'll try it out on my system on a fresh install to see what it does exactly.

#2

Any luck?

#3

Status:active» postponed (maintainer needs more info)

Late reply.

I think I figured out what the issue was - under the watchlist rules, if the node is not premoderated, its status may be changed but the node won't get disabled so other users on the site will be able to see it. I've updated the code so it checks that premoderation is not on - if its not and somehting is on the banned list, it gets hidden from the site (I think status = 0 for the node...can't remember).

Try the newest version (up tomorrow?)

#4

Status:postponed (maintainer needs more info)» fixed

Marking as fixed unless someone else continues to have issue with newest release.

#5

Status:fixed» active

Hi BTMash,

I just installed the newest 6.x update, but this error still occurs.
It is possible for a moderator to cllick the button 'Remove content', but the content is still visible.

In the database, the status of the node has changed from 1 to -1, instead of 0.
This should be the problem, because a status of 0 solves the problem.

Please fix :)

#6

Hi guys,

any updates? The last dev is from Nov 6th..
I really need this to work, and unfortunately I am not able to change this myself..

Thanks in advance!

#7

Having this same problem with views.

The default blog page does hide a flagged blog node but if a views listing is used
it still shows up the hidden blog node.

This same problem described here also - http://drupal.org/node/315404
That is exactly wht is happenning with me with all the latest recommended versions
of abuse and views.

#8

is this behavior still occurring with the latest dev version?
if it is, then it is definitely a critical issue.
can someone plz test and feedback?
thanks.

#9

This is still broken after multiple reports and even a submitted patch to fix it. The offending code is in abuse.module, and sets status to a negative value when attempting to remove an abusive post. This is just plain wrong. In comments, "1" means "in moderation" and "0" means "published." For nodes, it's the opposite.

function _abuse_remove($type, $oid) {
  db_query("UPDATE {abuse} SET valid=1 WHERE type='%s' AND oid=%d", $type, $oid);
  switch ($type) {
    case 'node':
      db_query("UPDATE {node} SET status=-1 WHERE nid=%d", $oid);
      break;
    case 'comment':
      db_query("UPDATE {comments} SET status=1 WHERE cid=%d", $oid);
      break;
  }
  _abuse_clear_oid_cache($oid);
  _abuse_set_status($type, $oid, ABUSE_REMOVED);
}

Drupal does not use negative values for node status, and PHP regards negative numbers as nonzero and therefore TRUE in a boolean evaluation.

This causes many unnecessary problems. Moderators clean up after a spammer, then block the account using the Abuse module. The Abuse module then goes through and RE-PUBLISHES THE SPAM.

We have had to patch this in our local images, along with a number of other bugs and usability issues.

#10

totally agree ...

for those who need an immediate workaround see my post here:

http://drupal.org/node/371022

that post handles VIEWS related nodes - as in, nodes that have been updated by abuse and therefore don't list correctly when using VIEWS to display them. it will not be any good for direct node access which will face the above mentioned issue.

for direct node access issues: you need to patch the abuse code (in the post above) to use only "0" in place of "-1" and actually "delete" the node that the ADMIN decides to "remove". so patch code to execute a SQL "delete" instead of "update".

EDIT:

see this post which has the patch to do the -1 to 0 change:

http://drupal.org/node/713602

it does NOT change the "update" to "delete" sql for node "removal" though, you still gotta do that manually, if you want to.

hope that helps :-)

nobody click here