Skip to:
Content
Pages
Categories
Search
Top
Bottom

Issue, ajax / jquery /scripts fail to load when bbpress is enabled.


  • CraftyMc
    Participant

    @craftymc

    Hello, I’m having some issues with bbpress, when i activate the plugin all the ajax / jquery features fail to work i.e add to watchlist button, posts, maps, and anything that uses scripts to load.

    Has anyone experianced this or know the cause, I enabled debug and it gives me this error, not sure if it’s linked, 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 /wp-includes/functions.php on line 3622

    At the moment I cannot use the plugin as my site uses a lot of scripts to load the features.

    Let me know if you’re able to help. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

  • Robkk
    Moderator

    @robkk

    Try some troubleshooting it could be your theme conflicting with bbPress. Try a default theme temporarily to see if is in fact bbPress causing the issue with any scripts.

    Troubleshooting

    Contact the theme author if it just your theme, and see if they have a fix for users that want to use bbPress.

    The debug information you got is explained here.

    bbp_setup_current_user was called incorrectly


    CraftyMc
    Participant

    @craftymc

    I debugged my site and found the culprit, it would appear my site didn’t like my custom function,

    function baw_no_admin_access()
    {
    if( !current_user_can( 'administrator' ) ) {
    wp_redirect( home_url() );
    }
    }
    add_action( 'admin_init', 'baw_no_admin_access', 1 );

    Iv’e now removed it and use a plugin to block access to the dashboard. 🙂


    Robkk
    Moderator

    @robkk

    Hmm that seems like a peice of code that has been posted on these forums before. Hopefully other users do not come across the same issue.

    I am glad that you resolved your own issue though. 🙂

    Are you using the WP Admin No show plugin? This is a plugin I usually recommend for users to use instead.


    CraftyMc
    Participant

    @craftymc

    Nope I’m using remove dashboard access, https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/ =) it’s the first one I came across which does exactly what I want.

    I didn’t want to just hide the admin bar I wanted to completely disable it for anyone who isn’t admin.

    And if someone try’s to access WP-admin they are redirected to a page of my choosing. =D


    Robkk
    Moderator

    @robkk

    🙂 I might have to start recommending users to use that instead since it configures the redirect url.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar