Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fix 404 issue for bbPress 2.2.x


  • 082net
    Participant

    @082net

    When I upgrade bbPress 2.1 to 2.2, all logged in users cannot connect to any forums(bbPress) but super-admins. ( 404 not found page )

    I’ve searched this support forum and they say “It’s related to Role Plugins…”
    But I don’t have any Role Plugins :-(

    Did a hard back trace for this error and found capabilities of bbPress dynamic roles applied after ‘bbp_template_redirect’ so bbp_forum_enforce_blocked() blocked any users not having ‘spectate’ cap – maybe all users.

    Then… we should manualy apply capabilities of bbPress role to current user.
    Here’s a temporary patch for this error.
    (Make a plugin or put these codes to your theme’s functions.php)

    `
    function bbp_fix_dynamic_role_cap() {
    $current_user = wp_get_current_user();
    $current_user->get_role_caps();
    }
    add_action( ‘bbp_template_redirect’, ‘bbp_fix_dynamic_role_cap’, -2 );// before bbp_forum_enforce_blocked()

    `

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

  • Umbrovskis.com
    Participant

    @rolandinsh

    Thank you! Worked to fix also my WPML (2.6.1, 2.6.3) issue related to this.


    baldg0at
    Participant

    @baldg0at

    Thanks so much, @082net!

    That did the trick for me.


    powermaniac
    Participant

    @powermaniac

    It appears that I have this same issue (only the admin and guests can see the forums). I tried adding this code to the functions.php file, but it doesn’t seem to fix it. I also noticed that I can create a new page and put the forum shortcode in it, and it the main forum page shows up for all users (which is what I need), but once I click on any of the forum links, it gives me a 404.

    Any ideas, or maybe options I should change, or caches and whatnot that I should clear?


    matrixd
    Participant

    @matrixd

    Hi, with 082net’s fix participants and all other roles are able to see the forums.

    In my forum I have a problem with moderator role privileges they can’t edit, split, or delete any post.

    I have check everything

    Is something else that you suggesting me!

    Thanks


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    This is a bit of a brute force hack, and only fixes the problem because something else is initializing the current user before $wp->init would naturally call it.

    Also, on multisite installations, this will cause other more annoying issues that are even more difficult to track down. :)

    There must be some other plugin that’s doing something wrong in your installation(s).


    matrixd
    Participant

    @matrixd

    Thanks JJJ that was it! The most common mistake!

    I was already update wordpress, buddypress, bbpress and my plugins, and then I follow these steps:

    1. I deactivate every plugin, except Buddypress and BBpress,

    2. I change my theme to the default buddypress theme, (without 082net’s fix on my function.php),

    3. I run the Tools > Forums > Remap existing users to default forum roles

    4. I change moderator users to moderator role, and then everything works! The moderator has his privileges and everyone can see my forums!

    5. Then  I change back to my child theme (still working without 082net’s fix on my function.php),

    6. and starting activate my plugins one by one, while I was checking if everything works.

    At the end, my upgrade forums works fine and the moderators too has there privileges.

    My installation is now:

    WP Multisite 3.5.1 (was 3.4.2)

    Buddypress 1.6.4 (was 1.6.1)

    BBpress 2.2.4 (was 2.1.2)

    +420k posts, 11k members

    Thanks for your help and for your time!

     


    Rics1983
    Participant

    @rics1983

    @JJJ
    Yep, it’s brute force, but at the moment is the only way, for non admin accounts, to see the forums if the wordpress installation is using also WPML plugin.
    If i deactivate WPML, also non admin users can see the forums, if i activate, admins can see the forums, but non admins get a 404 error page.


    mindctrl
    Participant

    @mindctrl

    A note to anyone that might be having 404 problems with non-admins, yet this time in version 2.3.

    I fixed the problem by doing the following in the WP admin:

    Tools > Forums > Remap existing users to default forum roles


    Mike
    Participant

    @mfkelly

    I’m having a problem with this still, in bbpress 2.5.3, WordPress 3.9.1, Buddypress 2.0.1

    In a public forum associated with a site, logged-in Buddpyress users who are not a member of that individual site get a 404 error because they don’t have ‘spectate’ privileges.
    Is that expected behaviour?
    N.B. I have tweaked things so that visiting users are *not* automatically set up with a site role. I only give them bbp_participant status if they already have a role in the blog site. Is that the issue?

    In debugging, I notice that in bbpress/includes/users/capabilities.php the visiting bbpress user who is not a member of the site is mapped a list of capabilities, including ‘specate’. However, in bbp_forum_enforce_blocked, the capabilities of the WordPress user are checked for spectate, not the bbp user. Hence the 404. If I check for the bbp user’s capabilities inside bbp_forum_enforce_blocked, they have been reset in any case.

    Can anyone give guidance on this? Thanks.

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

You must be logged in to reply to this topic.