thedude
Well-known member
We have our spam phrase settings (admin.php?options/list/spam) set to put threads and posts in moderation if they contain certain phrases, and the user has < x number of posts.
While we would get new threads in the moderation queue that had triggered the filter, we also were getting complaints of new users seeing the following message
So after some digging we found a discrepency...
In XenForo_ControllerPublic_Thread::actionAddReply, and XenForo_ControllerPublic_Forum::actionAddThread:
However in XenForo_ControllerPublic_Post::actionSave and XenForo_ControllerPublic_Post::actionSaveInline:
If you create or reply to a thread, and you trigger the spam phrase catcher, it'll honor your choice to go to moderation (if you selected that in the AdminCP). If you edit an existing post and trigger the spam phrase catcher, it won't honor the moderation choice and just reject it outright, which is very confusing for the user (and violates the option chosen by the admin).
While we would get new threads in the moderation queue that had triggered the filter, we also were getting complaints of new users seeing the following message
when editing their existing posts.Your content can not be submitted. This is likely because your content is spam-like or contains inappropriate elements. Please change your content or try again later. If you still have problems, please contact an administrator.
So after some digging we found a discrepency...
In XenForo_ControllerPublic_Thread::actionAddReply, and XenForo_ControllerPublic_Forum::actionAddThread:
Code:
switch ($spamModel->checkMessageSpam($input['message'], $spamExtraParams, $this->_request))
{
case XenForo_Model_SpamPrevention::RESULT_MODERATED:
$writer->set('message_state', 'moderated');
break;
case XenForo_Model_SpamPrevention::RESULT_DENIED;
$spamModel->logSpamTrigger('post', null);
$writer->error(new XenForo_Phrase('your_content_cannot_be_submitted_try_later'));
break;
}
However in XenForo_ControllerPublic_Post::actionSave and XenForo_ControllerPublic_Post::actionSaveInline:
Code:
switch ($spamModel->checkMessageSpam($input['message'], $spamExtraParams, $this->_request))
{
case XenForo_Model_SpamPrevention::RESULT_MODERATED:
case XenForo_Model_SpamPrevention::RESULT_DENIED;
$spamModel->logSpamTrigger('post', $post['post_id']);
$dw->error(new XenForo_Phrase('your_content_cannot_be_submitted_try_later'));
break;
}
If you create or reply to a thread, and you trigger the spam phrase catcher, it'll honor your choice to go to moderation (if you selected that in the AdminCP). If you edit an existing post and trigger the spam phrase catcher, it won't honor the moderation choice and just reject it outright, which is very confusing for the user (and violates the option chosen by the admin).