1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

As Designed Spam filter ignoring "Manually approve" for posts

Discussion in 'Resolved Bug Reports' started by thedude, Jun 1, 2015.

  1. thedude

    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
    when editing their existing posts.

    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).
     
  2. Mike

    Mike XenForo Developer Staff Member

    This is basically as designed. There are some options that don't really support moderation -- a good example would be signatures and conversations, though also post editing as we don't send things back to moderation through it.
     
  3. thedude

    thedude Well-Known Member

    Fair enough.

    Then the descriptive text for that option should indicate that manual approval will only occur for new threads and replies to threads, and edited posts will always be rejected if they contain one of the spam phrases within the specified post count.

    It's easy to see how one can be mislead by the way it's shown at the moment.
    Screenshot_2015-06-01-02-47-26~01.png
     
    Last edited: Jun 1, 2015

Share This Page