BuddyPress not working in Membership 2.0.3

I’ve had this issue since 1.x on the same site, to the point that I just disabled it and left it for the time being. I re-installed it and went live with 2.x but forgot to test this again before going live!

i’ve tried negative and positive combinations, for the visitor and paid levels, no luck.

its’ 2am here so giving up and resting up, but if you can give a php line or function where I could just remove BP restrictions for now that would do for me as a short-term solution, i just need unrestricted bp access.

the only thing i can think of that is “special” in my install is that the bp forum uses an old forum tables from bb and BP_FORUMS_PARENT_FORUM_ID is set to a custom id.

thanks!

  • Mason
    • DEV MAN’s Sidekick

    Hiya Marcus,

    That’s really odd. The define for bp forums shouldn’t have any impact on the plugin rules.

    Couple of thoughts on this,

    Did you try repairing the membership database option in the plugin?

    Are the pages completely blocked (as in URLs) or just the nav menu items?

    Finally, what about the theme. Are you using one from here? I’ll ask a few more folks to follow up here, but let us know these initial answers so we can start narrowing down where the conflict exists.

    Thanks!

  • Marcus
    • Site Builder, Child of Zeus

    yes, I did repair, although I actually installed it from scratch to begin with (deleted 1.x + tables and reinstalled as it was inactive).

    check it out for yourself … I had to change the access page a little as the site is active. http://wp-events-plugin.com/forums/

    r.e. theme, see the bottom of page, it’s an eleganttheme theme.

    i’ve tried positive/negative rule combinations and no luck. at the moment I have two memberships (subs/levels), visitor and member but only member available with signups remaining active. Only thing I need atm is a negative shortcode rule for my visitor level to hide bits of comments in the future.

    aside from that, love the plugin. the rules bit is really cool.

    on another note, is this support topic open/closed feature you added to the forums a bp plugin, bb, or something you made? I’m deciding on ways to support the plugin atm :slight_smile:

  • Marcus
    • Site Builder, Child of Zeus

    I’m having to debug this manually because I can’t wait any longer for help here, but it would really help me and save me loads of time if a dev could tell me how to disable the BP via php if there’s an action or something to comment out, or where this logic is handled.

  • Mason
    • DEV MAN’s Sidekick

    Hiya Marcus,

    Apologies for the delay in response here. I can’t think of what would cause the BP rules to go away, but they do appear to be blocked with the ‘no access’ message showing:

    http://wp-events-plugin.com/activity/

    I’m stumped as to why the pages would be blocked, but have asked the dev to drop in here and take a look.

    on another note, is this support topic open/closed feature you added to the forums a bp plugin, bb, or something you made? I’m deciding on ways to support the plugin atm

    It’s all custom code written specifically for bbPress – though may be something we’ll roll into a plugin at some point.

  • Marcus
    • Site Builder, Child of Zeus

    found a solution…. but not an ideal one, this just enables the default bp root slugs and bypasses check on them.

    classes/membershippublic.php 697 (first line already there)

    ´

    if(!empty($M_options) && $wp_query->queried_object_id != $M_options && !defined(‘M_REACHED_MENU’:wink:) {

    $urls = explode(‘/’,$_SERVER);

    if( in_array($urls[1],array(‘members’,’groups’,’forums’:wink:) ){

    return true;

    }//fix

    ´

    seeing as someone else is reporting this too, I’d say it’s a bug. I tried disabling all plugins, using the normal bp theme, your url group suggestion, nothing.

  • Mason
    • DEV MAN’s Sidekick

    Hiya Marcus,

    The problem is we’re unable to replicate it at this point. I’ve got membership and have done testing with BuddyPress on 3 different installs and am not able to get it to break BuddyPress pages.

    Would you be willing to send us a guest admin login to take a look at your install directly? Maybe then we can see what’s going on here.

    If so, please send the appropriate details through our contact form here:

    https://premium.wpmudev.org/contact/

    Include my name in the subject (Mason) and also a link to this thread.

    Unless you’ve already modified the code in a way that works for you. Let us know.

  • Marcus
    • Site Builder, Child of Zeus

    OK, so I’ve managed to fix my local, and I’m 99.9% certain it’ll fix the issue on the live site too!

    I was setting up a mirror for debugging and I thought I’d try deleting BP and reinstalling… it worked this time (I had tried this before back in membership 1.x but not recently as the problem hadn’t changed).

    I went a little further and did some more tests today and found that if I delete the bp records in the wp_options table (everything LIKE %bp_% minus a few bp-dependent plugin options), de/reactivate, reinstall the forums, but then edit the prefix in the bb-config (had tried that before too!), everything just starts working again.

    So… not sure what went wrong, but I can safely say that it’s not your fault! It must have had something to do with the fact that we ported the bbPress forum from an actual bbpress installation from another domain.

    If you’re adding membership to an already established bp site and have the problems I had, the above should fix things without having to adjust many (or any) settings from default.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.