Posted by gnassar on December 30, 2010 at 11:12am
3 followers
Jump to:
| Project: | Spam |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
For a not-marked-as-spam user, the first click on "mark as spam" blocks the user, but leaves spam probability at 0; the second click changes spam probability to 99 (so it registers as "spam" according to the link) -- user remains blocked; the third click (now on "mark as not spam") properly clears both block status and spam probability.
(Jeremy: I'm not getting the "invalid argument in foreach()" $token error that you did, oddly enough. Perhaps it had something to do with the specific user you decided to block?)
Comments
#1
gnassar,
There could be some code that was not synchronized right too... So we should have Jeremy try to reproduce the error again with the latest + that other patch of yours.
Now, what I meant with the "Mark as spam" and multi-clicks was more something like a User Spam table which has a counter and when the counter reaches 3 (set by admin) then the Spam module blocks the user. This being said, the Rules could probably achieve that "automatically"... Just a thought.
Thank you.
Alexis
#2
Yes, I understood what you meant -- I don't know that that's within the scope of the user content module, though. It seems more like that would belong in the node module, and when it hits 3 messages it somehow calls the user module to mark the user.
The user content module doesn't deal with messages at all -- it deals exclusively with user profiles. The "mark as spam" link we're talking about is in the user profile page (after the patch in #862982: node, comment, but not user; it doesn't exist before then and hasn't for a very long time), in the "summary" area.
That should (arguably) block the user and set the spam probability of the content item to 99, but it's only blocking. That leaves the spam probability at 0, so it registers as "not spam" and the link still says "mark as spam." If you click on it again, the user stays blocked but the probability is set to 99, so the user shows as "spam" and the link correctly says "mark as not spam."
The "mark as not spam" link works fine.
On an additional note: if the person administering spam doesn't have "bypass spam filters" right as well, that first click has another effect -- it sends you to the spam/denied page. Not sure if that's connected; haven't looked at the code too closely yet.
#3
> On an additional note: if the person administering spam doesn't have
> "bypass spam filters" right as well, that first click has another effect --
> it sends you to the spam/denied page. Not sure if that's connected;
> haven't looked at the code too closely yet.
One possible cause for this could be if you have the duplicate filter enabled, and you're doing all your testing from the same machine. Even if you're logging in as different users, once you've marked enough test content as spam, the duplicate filter will block your IP address... Enable debug logging in the spam module and review the spam logs to determine if indeed this is what is happening to you.
#4
Boy, I guess that's possible -- but that can't possibly be an intended result, right? I mean, that duplicate would mark as "duplicate" the action of solely marking something as spam? It seems like it should ignore that particular action. Admins with lots of spam that have had their site for a while can't possibly appreciate that problem existing...
Do we need to look at that as a filter_duplicate bug?
#5
The IP recorded would (should) be that which was used to POST the spam, not that which was used to mark the post as spam.
#6
Oh, I gotcha -- you mean if I created and then marked the test spam. No, I haven't been doing that. I have plenty of real spam I could use without having to resort to creating my own test spam. :) So I doubt that's the problem with that. Not sure what it would be off the top of my head, though. I'll dig through debug logs in a few.