BP/MS Pro Sites with Membership Pro 2 - Pro Site option gone on signup

I have a Multisite installation with BuddyPress and with this I was using Protected Content, Multisite Privacy, Sign Up Code and Invite Anyone and the guys here helped me get that all rocking pretty good. I did not finish and launch the project (it is a private family social site) and in the meantime Membership Pro 2 came out so I had some time and decided to get this launched this week. So I upgraded to Membership Pro 2 and sent myself an Invitation from my admin profile page. Got the email, went through the process a user would go through upon receiving this invitation. So, everything went well, I was presented with the register form, and the sign up code field. Entered all of that info including my user name and password and signed up. I was presented with a read your email activation link. Cool. Went to email and clicked on it and activation was confirmed. I then went to log in. I was able to log in with the user name and password I created o the register form, but I did not get access to all of the pages for that membership level. And also I did not get asked anything about signing up for pro sites options like I used to.

At this point I received an email from my installation with my user name and a wordpress generated password which was different than my password I created. This password did not work at any rate, it was different and confusing.

I'm not sure where I went wrong, there is so much going on here.

Here is my wish list:

A private all content visible to members (Membership Pro 2) only, by invite (SignUp Code / Invite Anyone) code, buddypress (BuddyBoss theme) community offering the option to create a website / blog (Pro Sites) and the user being able to decide if that website / blog is private (Multisite Privacy) to the community or open to the public.

Any ideas if this can be accomplished using the plugins above, and if so, where I might be going wrong in my settings? There are a lot!

Cheers!
Chris

  • Michael Bissett

    Hey @Chris, it's Michael, from the live chat session earlier today. :slight_smile:

    I was able to log in with the user name and password I created o the register form, but I did not get access to all of the pages for that membership level. And also I did not get asked anything about signing up for pro sites options like I used to.

    Two questions on my mind for this one:

    - What pages aren't you able to access presently, that you should be able to with the membership?
    - Where would you be asked about signing up for Pro Sites options?

    At this point I received an email from my installation with my user name and a wordpress generated password which was different than my password I created. This password did not work at any rate, it was different and confusing.

    You wouldn't be the first user to run into this issue, but fortunately, there's a fix for this:

    http://wordpress.stackexchange.com/questions/147274/how-to-stop-wordpress-emailing-a-password

    Kind Regards,
    Michael

  • Chris

    Hi Michael,

    Thanks for following up.

    - What pages aren't you able to access presently, that you should be able to with the membership?

    profile, activity, members, sites, pro-site, memberships, photos... basically all of the buddypress pages including the buddypress toolbar upper right that should have a drop down menu with profiule, wall etc.. All of these are available to my super admin account but not to the new basic user I created. When I log in with that regular user I get redirected to the account page and I can go to the home page, that's it.

    Where would you be asked about signing up for Pro Sites options?

    I used to be asked Do you want a blog site or something like that, during the sign up process.

    Cheers!
    Chris

  • Chris

    You wouldn't be the first user to run into this issue, but fortunately, there's a fix for this:

    http://wordpress.stackexchange.com/questions/147274/how-to-stop-wordpress-emailing-a-password

    This link shows two sets of code, do both go in my functions.php?

    First:

    if ( ! function_exists( 'wp_new_user_notification' ) ):
    function wp_new_user_notification( $user_id, $plaintext_pass = '' )
    {
            $user = get_userdata( $user_id );
    
            // The blogname option is escaped with esc_html on the way into the database in sanitize_option
            // we want to reverse this for the plain text arena of emails.
            $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    
            $message  = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
            $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
            $message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n";
    
            @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
    }
    endif;

    Second:

    function wpse_new_user_notification( $user_id, $plaintext_pass = '' )
    {
        if ( empty($plaintext_pass) )
            return;
    
        $user = get_userdata( $user_id );
    
        // The blogname option is escaped with esc_html on the way into the database in sanitize_option
        // we want to reverse this for the plain text arena of emails.
        $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    
        $message  = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
        $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
        $message .= wp_login_url() . "\r\n";
    
        wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);
    }
  • Ash

    Hello @Chris

    I hope you are well today.

    Use the following code instead of both:

    if( ! function_exists( 'wp_new_user_notification' ) ){
            function wp_new_user_notification($user_id, $plaintext_pass = '') {
                    $user = get_userdata( $user_id );
    
                    // The blogname option is escaped with esc_html on the way into the database in sanitize_option
                    // we want to reverse this for the plain text arena of emails.
                    $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    
                    $message  = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
                    $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
                    $message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n";
    
                    @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
    
                    if ( empty($plaintext_pass) )
                            return;
    
                    $message  = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
                    $message .= wp_login_url() . "\r\n";
    
                    wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);
    
            }
    }

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Chris

    Hi Ash,
    Thanks. That solves one of my questions.
    I am still not able to:
    a-) new users are not presented with the option to get a pro site on sign up like they used to be able to do. That option is no longer available on the register form page.

    b-) basic free users are not able to view any pages other than these two, Welcome Home and Account. None of the buddypress pages are viewable and the buddypress toolbar that is normally up in the top right corner, not there. Admin can see all of these. See above, my message to Michael regarding the list of specific pages not accessible to basic members.

    On June 30, you asked me to grant access so you could have a look.
    Did you have a look? What did you find?

    Cheers!
    Chris

  • Michael Bissett

    Hey @Chris! :slight_smile:

    a-) new users are not presented with the option to get a pro site on sign up like they used to be able to do. That option is no longer available on the register form page.

    This functionality looks to have been replaced in 3.5 with the new Signup on Checkout functionality, that would explain why you're not seeing this option anymore.

    However, I'm not seeing that there's the option to sign up for a site on your signup form in the first place, seems like you might have allowed that only for logged in users from:

    Settings -> Network Settings

    Either that, or you've enabled the "Signup on Checkout" functionality I mentioned earlier.

    b-) basic free users are not able to view any pages other than these two, Welcome Home and Account. None of the buddypress pages are viewable and the buddypress toolbar that is normally up in the top right corner, not there. Admin can see all of these. See above, my message to Michael regarding the list of specific pages not accessible to basic members.

    Thanks for sharing that list, that really helps! :slight_smile:

    I'm seeing that the Support Access has expired for your site in the meantime, could you please re-enable it, so that we can have another look at things here?

    Kind Regards,
    Michael

  • Michael Bissett

    Hey @Chris, thanks for granting that! :smiley:

    basic free users are not able to view any pages other than these two, Welcome Home and Account. None of the buddypress pages are viewable...

    The "basic free users", are those family members that have registered for an account on your site, but haven't signed up for your "Family Members Only" membership yet?

    Or are they supposed to be inside of the "Family Members Only" membership from the get-go. when they sign up for an account on your site?

    If it's the former, then they'd need to sign up for the membership first, you'd want to provide a link to the /memberships page on your site.

    If it's the latter however... then we'll need to readjust the strategy here. :slight_smile:

    Instead of using the "Standard Membership" type, we'd want to instead use the "Default Membership" type, that's designed to control access to content, for users who haven't joined another membership yet.

    I've gone ahead and created such a membership for you, called "Test Default Membership", feel free to change the name & give it the access rules that your other membership has.

    ... and the buddypress toolbar that is normally up in the top right corner, not there.

    That was hidden due to the "Hide admin toolbar" setting inside of:

    Membership 2 -> Settings -> General

    I've turned that option off, and I'm seeing that it's showing up for a normal user now. :slight_smile:

    Hope this helps! :slight_smile:

    Kind Regards,
    Michael

  • Chris

    Hi Michael,

    Thanks for that! As mentioned in my OP, I had a working protected content setup and simply upgraded without changing any settings... at least I don't recall changing anything! I was afraid to given the complexity of the combination of plugins.

    Let me go look at what you have accomplished and then I will get back.

    So, in the meantime, here is exactly what I am trying to do.

    I would like a buddypress set up where code invited family members only can get membership to post and read each others posts, photos etc. Kind of like a private social network along the lines of FB etc. but non logged in visitors will not have access to anything other than the home page and register page. They of course need the invite code to complete the register process. There will not be any charge for this.

    Additionally, I would like to offer advanced family members the opportunity to create their own personal wordpress site that they have control over who can view the site, the members only, or general public. I am not wanting to charge them for this, I just would like the option to be there for them when they register.

    Make sense? Doable with the login choices I have made?

    Cheers!
    Chris

    Those are the only two types of memberships needed, and if I understand correctly pro-sites handles the personal site option.

  • Ash

    Hello @Chris

    I hope you are well today.

    I would like a buddypress set up where code invited family members only can get membership to post and read each others posts, photos etc.

    Would you please try our signup code plugin?
    https://premium.wpmudev.org/project/signup-code/

    but non logged in visitors will not have access to anything other than the home page and register page.

    In that case, you need to have a membership, I can see you already have one, so go to Membership 2 > Protection Rules and mark all pages (except home and regster) protected and available for that only membership.

    Additionally, I would like to offer advanced family members the opportunity to create their own personal wordpress site

    Well, membership can't control the site creation. Membership works in site level where site is created in network level. It might be possible by customizing the plugin.

    Cheers
    Ash

  • Chris

    Hi Ash,
    I had this all working before upgrading to Membership Pro 2 from Protected Content.

    I was and still do use SignUp Code (See my OP in this thread) for the purpose of providing and managing the invitation code. I then use Invite Anything to send out that code to newly invited members.

    I have Pro-Site installed for the site creation and management. I am pretty sure though that before making this upgrade from Protected Content to Membership Pro 2, the signup form asked the user if they wanted to create a blog. Now, it does not. How can i enable that? Is it still possible?

    Cheers!
    Chris

  • Chris

    Ash,
    On more thing I discovered, since upgrading from protected content to M2Pro... when you click on the Pro-Site link in my nav menu, IF you are regular user, it errors out saying that you need admin role. When yo are admin and click on that link... the page opens with this info

    Pro Site

    Warning: array_keys() expects parameter 1 to be array, null given in /home/krowchuk/public_html/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/View/Front/Checkout.php on line 107

    Warning: in_array() expects parameter 2 to be array, null given in /home/krowchuk/public_html/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/View/Front/Checkout.php on line 108

    Warning: in_array() expects parameter 2 to be array, null given in /home/krowchuk/public_html/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/View/Front/Checkout.php on line 109

    Warning: in_array() expects parameter 2 to be array, null given in /home/krowchuk/public_html/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/View/Front/Checkout.php on line 110

    Warning: in_array() expects parameter 2 to be array, null given in /home/krowchuk/public_html/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/View/Front/Checkout.php on line 111

  • Ash

    Hello @aecnu

    Hope you are well :slight_smile:

    I don't have any static IP I am afraid. Every time I connect with internet I have been assigned a new IP. Also, when my ISP restarts their server, the IP is changed too. But always it starts with 182.48.

    If that's difficult, I can transfer this ticket to someone else?

    Please note, I have tried with VPN (FF addon) and a UK selected server, but it didn't work either.

    Please let me know.

    Cheers
    Ash

  • Michael Bissett

    Hey @Chris & @aecnu, it's me again! :slight_smile:

    Chris, I see that you've already taken care of the protection rules, so let's cover your other points:

    Additionally, I would like to offer advanced family members the opportunity to create their own personal wordpress site that they have control over who can view the site, the members only, or general public. I am not wanting to charge them for this, I just would like the option to be there for them when they register.

    In order to get the blog signup option to come back, I had to go into:

    Pro Sites -> Settings -> General Settings

    And disable "Signup on Checkout", as it was disabling the default method that WordPress uses to register a site on the network.

    So that option's been restored. :slight_smile:

    IF you are regular user, it errors out saying that you need admin role.

    You're referring to this error, right?

    Sorry, but it appears you are not an administrator for any sites.

    In this case, a user would need to have a site set up on your network, he can't very well upgrade to a Pro Site level without one, can he? :slight_smile:

    As for this though:

    When yo are admin and click on that link... the page opens with this info

    I was able to resolve this by going to:

    Pro Sites -> Levels

    And saving your levels again. However, there's one thing I'll need you to do here. :slight_smile:

    A "division by zero" error comes up on the page (which the developer has been busy working with), we can resolve this in the meantime by replacing this file:

    /pro-sites/pro-sites-files/lib/ProSites/View/Front/Checkout.php

    With the copy inside the attached .zip file. :slight_smile:

    And now... a bonus item. :slight_smile:

    I noticed that I wasn't able to create a site on your network via the "Sites" page linked to in your nav bar, I was able to resolve this for you by going to:

    Membership 2 -> Protection Rules -> URL Restrictions

    And allowing the users in your default level access to this URL.

    Hope this helps! :slight_smile:

    Kind Regards,
    Michael