Fixed Possibly a bug, batch moderation of deleting posts in the "search" section.

Affected version
2.2.0

cyberdyne

Member
Spammers write many identical messages, I find them using a search, and I try to delete them by selecting/checking along with those already deleted.

find "some multi post content"
enable moderation->post
check posts to delete with posts already deleted
choose action «delete posts»->go
Deletion type -> Remove from public view
with «some» reason
delete button

and nothing happened

If you select only non-deleted messages, everything is fine.
 

Chris D

XenForo developer
Staff member
and nothing happened
What are you expecting to happen, exactly, versus what is actually happening and what happens with non-deleted messages?

I just tried it with our spam forum here with similar conditions and the behaviour is the same with non-deleted messages, already deleted messages and a mix of messages.

The page reloads after the action completes - albeit subtly - but the appropriate actions have been taken to the threads. i.e. threads that aren't yet deleted are now deleted. Threads that were already deleted still are deleted.

It might be worth trying again but with all add-ons disabled to see if the behaviour changes.
 

cyberdyne

Member
I'll try without addons a little bit later, very high-load forum :(.
I just tried it with our spam forum here with similar conditions and the behaviour is the same with non-deleted messages, already deleted messages and a mix of messages.

The page reloads after the action completes - albeit subtly - but the appropriate actions have been taken to the threads. i.e. threads that aren't yet deleted are now deleted. Threads that were already deleted still are deleted.

But maybe you tried to repeat this with threads, and I'm talking about messages in threads (posts).

Messages (posts) in my case are not deleted. It would probably be logical to delete everything that still not deleted..
 

Chris D

XenForo developer
Staff member
It works as expected with messages too for me.

Inline moderation will always perform all actions that are applicable, even if some of those actions have already been applied. That will generally be the same with all content types.
 

Mike

XenForo developer
Staff member
We've identified the issue and have fixed it for 2.2.2. It may come up in other places, such as the spam cleaner. In inline moderation, it's execution order dependent.

The issue applies to both threads and posts so there are fixes for each.

For posts, in src/XF/Entity/Post.php, add the line in red:

Rich (BB code):
if ($rawPost['message_state'] == 'deleted')
{
   $db->commit();
   return false;
}

For threads, in src/XF/Entity/Thread.php, add the line in red:

Rich (BB code):
if ($rawThread['discussion_state'] == 'deleted')
{
   $db->commit();
   return false;
}
 

spirogg

Active member
Spammers write many identical messages, I find them using a search, and I try to delete them by selecting/checking along with those already deleted.

find "some multi post content"
enable moderation->post
check posts to delete with posts already deleted
choose action «delete posts»->go
Deletion type -> Remove from public view
with «some» reason
delete button

and nothing happened

If you select only non-deleted messages, everything is fine.
a little late on my response since its fixed already but. a thank you is deserved for you finding this bug. so Thanks :)
and thanks to @Chris D and @Mike for the fixes :)
 
Top