Skip to:
Content
Pages
Categories
Search
Top
Bottom

Users getting marked for spam after upgrading to BP 2.0.2

  • @milosnikolic

    Participant

    After upgrading to 2.0 (and 2.0.2 now) some users have been marked as spammers and their activity is not showing up at all in the activity feed. I don’t have Askimet or any other security plugin enabled, actually I tried disabling everything except BP and it still persists. I can fix it by marking the user manually for spam in the user list, then unmarking them, but it happens again if they try to post.

    I noticed an entry in the bp_activity table “is_spam” field is set to 1 for those users. Is there a way to disable this spam filtering totally? As my site is private and registrations are closed anyway…

Viewing 15 replies - 1 through 15 (of 15 total)
  • @shanebp

    Moderator

    Are you using a custom theme?
    Try switching to a theme like WP Twenty Thirteen and see if the problem persists.

    Do you have any functions in plugins/bp-custom.php, if it exists.

    @milosnikolic

    Participant

    Yes I’m using a custom Buddypress theme (Cinematix) but it’s updated to the newest version and no one else has that problem. bp-custom.php doesn’t exist. I tried switching the theme also and same thing is happening.

    Is there a way to disable buddypress flagging users for spam, so that is_table field isn’t being set to 1?

    @milosnikolic

    Participant

    In phperrorlog I get this error:

    WordPress database error Unknown column ‘spam’ in ‘where clause’ for query SELECT ID FROM lb_users WHERE ID=1 AND spam != 1 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/Cinematix/bbpress.php’), get_sidebar, locate_template, load_template, require_once(‘/themes/Cinematix/sidebar.php’), dynamic_sidebar, call_user_func_array, WP_Widget->display_callback

    @shanebp

    Moderator

    Then the problem is in those files.
    There is no column ‘spam’, the column name is ‘is_spam’.

    If you switch themes to a WP theme like 2013, do you still get those errors?

    @milosnikolic

    Participant

    Yes it was a typo, I meant “is_spam”. Yes I tried switching and the same thing is happening, it’s not for all users, but most have the problem. When I mark for spam/unmark in the users list their old activity shows up (when they were marked for spam, and it’s reset to 0 in the table), but as soon as they log in and try to post it goes back to marking their activity as 1 in is_spam column, and not showing anything (and not giving them access to bbpress forum also).

    @shanebp

    Moderator

    As I said, the problem is in those files.

    Again… If you switch themes to a WP theme like 2013, do you still get those errors?
    If you do, paste the errors in your reply.

    @milosnikolic

    Participant

    When I turn on the debug mode in WP this is what shows up:

    Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in public_html/wp-includes/functions.php on line 3245

    Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in public_html/wp-includes/functions.php on line 3245

    Notice: wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.) in public_html/wp-includes/functions.php on line 3245

    @milosnikolic

    Participant

    Ok I cleared the log so only new errors show up, and after switching to 2013 theme I don’t get any errors in but it still doesn’t work, user activity isn’t showing up, their profile is empty with no activity and they cant post in bbpress forums (“You cannot create new topics” message – they have correct Participant rank).

    @milosnikolic

    Participant

    Sorry the theme was Twenty Fourteen, but still it seems it’s not a theme issue.

    @shanebp

    Moderator

    Those notices are about bbpress, not buddypress.
    Try asking on the bbpress support forums.

    @milosnikolic

    Participant

    Yes I thought so but one of the first things I tried is to disable all plugins except Buddypress and it was still happening. I tried it again now – bbpress error is for something else it seems, as users still get marked for spam even when it’s disabled.

    @milosnikolic

    Participant

    Ok here I found this:
    “Added new “hide_spam” parameter to the entire Activity template loop stack; defaults to true, except if specific activity items have been requested (for backpat reasons).”

    I found “hide_spam” in 3 files in buddypress but it’s already set to false? How can I disable this option?

    Is it here in bp-activity-template.php:

    // If a user is a spammer, their activity items will have been automatically marked as spam. Skip these.
    if ( $comment->is_spam )
    continue;

    $user_ids[] = $comment->user_id;

    or here


    @type
    string|bool $spam Spam status. ‘ham_only’, ‘spam_only’, or false
    * to show all activity regardless of spam status. Default: ‘ham_only’.

    @milosnikolic

    Participant

    Ok I found it… After changing 2 default settings for spam from ham_only to false it works and shows everything now.

    But I can’t figure out why they are marked as spammers in the first place after the 2.0 update.

    @shanebp

    Moderator

    You’re looking at a symptom, not the problem.
    If users are marked as spammers, then activity comments will be marked as spam.
    So that part is working properly.

    The real question is, why are users being marked as spammers?

    To show comments regardless of spam flag, try this in the activity-loop.php template:
    if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&spam=false' ) ) :

    @milosnikolic

    Participant

    Yeah I understand that it’s how it was designed to work, but it should only do it if you manually mark someone or if akismet does it. But it has to be Buddypress as nothing else is enabled, but why some users and not all then…

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Users getting marked for spam after upgrading to BP 2.0.2’ is closed to new replies.
Skip to toolbar