Membership 2 funcionality issues

Hi.

I am incurring 3 problems with the Membership 2 Pro plugins.

Please review the following screencast with the volume on: http://screencast.com/t/f4AptIfGi

This is my content protected post: http://162.144.60.226/~taggedbyanangel/sn-27m6c/

Issue 1: if I go to a restricted post my Content protection message that i set up does not display.

Issue 2. My invite code is not displaying when I click registration on a protected post that requires invite only registration/

Issue 3: if I do fill out the registration form and try to submit it the form indicates that my passwords do not match even though they do.

Please advise.

  • Kasia Swiderska

    Hello David,

    Issue 1: if I go to a restricted post my Content protection message that i set up does not display.

    Please add this line to wp-config.php file:

    define(''MS_PROTECTED_MESSAGE_REVERSE_RULE', true);

    let me know if this will help with protection message

    Issue 2. My invite code is not displaying when I click registration on a protected post that requires invite only registration/

    If you are referring to invitation code add-on this is correct behavior as they are only for joining membership not for the registration from.

    Issue 3: if I do fill out the registration form and try to submit it the form indicates that my passwords do not match even though they do.

    Can you change theme to one of the default ones like 2016 and see if you will have the same problem? This is known issue with some themes that are using validations on login forms in the top bar.
    If changing theme will work, please try this code:

    <?php
    
    add_action( 'wp_footer', 'rename_login_password_id' );
    function rename_login_password_id() {
        ?>
        <script type="text/javascript">
          jQuery(document).ready(function() {
            jQuery('#popup_login .password_field input').attr('id', 'login_password');
          });
        </script>
        <?php
    }

    used as MU plugin http://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    kind regards,
    Kasia

  • David

    Hi and thank you for replying.

    Re. Issue 1. The code works and is applied.

    Q: do I have to worry about the patch being erased when I update to WP 4.5.3 and future updates?

    Re Issue 2:

    If this is the case then How do I add a membership link to JOIN this specific membership when redirected from my protected post to the page with the password protection message?
    (in this case it is redirected to http://162.144.60.226/~taggedbyanangel/protected-content/?redirect_to=http%3A%2F%2F162.144.60.226%2F~taggedbyanangel%2Fsn-27m6c%2F&membership_id=2884

    NOTE: under Memberships...Details I have "his membership is public" set to "off".

    Note: I do not want my memberships to appear on the Membership list. Site visitors should only know of the post that they are invited to and not see the list of other membership options for the other pages.

    It's key to offer the option for membership for the protected post that is associated with that particular membership. In the example provided the post http://162.144.60.226/~taggedbyanangel/sn-27m6c/ is associated with ONLY the membership named SN:27M6C.

    RE Issue 3:

    Yes, the form works when theme twenty-fourteen is active. Note: I set up the MU folder under wp-content. Q: what should I name the file in the MU folder? example: registration.php?

    Please advise.

  • Nithin

    Hi David,

    Hope you are doing good today. :slight_smile:

    Q: do I have to worry about the patch being erased when I update to WP 4.5.3 and future updates?

    During a WordPress update wp-config.php will remain intact as this file contains all the required settings, in order for your website to function. But would recommend that you always take a backup. You could try the Snapshot plugin to backup your entire website with a click.

    Re Issue 2: If this is the case then How do I add a membership link to JOIN this specific membership when redirected from my protected post to the page with the password protection message?

    I'm afraid there isn't any settings out of the box in the plugin for this, what you could do is edit each membership accounts under Memberships 2 > Memberships, and place the link in your Content Protection Message section for each Membership.
    http://yourdomainURL.com/register/?membership_id=160

    Where id represents your membership id, and hence you can have your own message for each memberships with different links that directs to each membership.

    In order to display the protection message for each membership, you'll have to define this in your wp-config.php file:
    define('MS_PROTECTED_MESSAGE_REVERSE_RULE', true);

    RE Issue 3: Yes, the form works when theme twenty-fourteen is active. Note: I set up the MU folder under wp-content. Q: what should I name the file in the MU folder? example: registration.php?

    Glad to know it works, you could give any name, the only criteria for mu-plugins to work is that it has to be a .php file, even test.php works fine, you'll have to make sure you don't declare the same file name twice. Would recommend you keep a naming convection, so that you can keep the files organized.

    I hope this helps. Please let us know if you still need any further assistance. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • David

    We are getting there, thanks!

    Okay, if I go to: http://162.144.60.226/~taggedbyanangel/2907-2/

    If I am not already registered with the website and I click on the new "Join now" link at:

    http://162.144.60.226/~taggedbyanangel/register/?membership_id=2884

    If I fill out the registration form and submit, it now submits due to the mu-plugin. I am then redirected to:

    http://162.144.60.226/~taggedbyanangel/register/?step=payment_table&membership_id=2884

    And I am prompted to Join and APply my invitation. Good.

    If I apply my invite code then the Signup button appears:

    Q: how do I edit the text on the button?

    Q: how do I add additional instructional text to this section with the sign up button?

    Note: When I do click Sign-Up I am again redirected to:

    Q: how do I change the verbiage in the green section that presently reads:

    "Your request to join the membership was successfully received!
    The Payment Gateway could take a couple of minutes to process and return the payment status."

    --- PROBLEM ---

    If I login and am already a registered site member but not for this membership plan and I go to the membership protexted page here:

    http://162.144.60.226/~taggedbyanangel/2907-2/

    And I sign in:

    ...I redirect to:

    http://162.144.60.226/~taggedbyanangel/account/

    There I can click on "Change" under Your Membership I am then redirected to:

    http://162.144.60.226/~taggedbyanangel/memberships/

    but there is no link to the memberhsip plan as it is a private plan (as mentioned at the outset of the ticket)...

    QUESTION: How does a logged-in and registered site member sign up for the private plan under this scerio, which is likely to happen in some cases?

    Side Qusestion:

    If I go to: http://162.144.60.226/~taggedbyanangel/2907-2/

    Note: My short code for the button on the page does not display.

    Q:smiley:o you happen to know why? This button works for all other pages and posts.

  • David

    Followup Problem:

    I am having issue with the login module at the top of the page.

    Please refer to the screen cast: http://screencast.com/t/46USgkFv44u?

    When I log out of this site (I’m using chrome) and then try to log back in be it by email and password or by username and password I filled the login using the correct information.

    I am only able to login to a roundabout way of going to a password protected page here: http://162.144.60.226/~taggedbyanangel/sn-27m6c/ and then using the login information on that page to successfully log back in

    Q: is this related to Issue 3 and does this too need an MU plugin to work?

  • Kasia Swiderska

    Hello David,

    Q: how do I edit the text on the button?

    Q: how do I add additional instructional text to this section with the sign up button?

    Note: When I do click Sign-Up I am again redirected to:

    Q: how do I change the verbiage in the green section that presently reads:

    "Your request to join the membership was successfully received!
    The Payment Gateway could take a couple of minutes to process and return the payment status."

    At this moment this is not possible entirely possible - you can use our plugin Ultimate branding ( https://premium.wpmudev.org/project/ultimate-branding/ ) and module to text replacement to change some of the text sting you see, but editing whole checkout screen without changing plugin code cannot be done.
    I know that developers are preparing feature that will allow to do that with templates, but it will be available in the future releases.

    but there is no link to the memberhsip plan as it is a private plan (as mentioned at the outset of the ticket)...

    QUESTION: How does a logged-in and registered site member sign up for the private plan under this scerio, which is likely to happen in some cases?

    In order to see and be able to join membership it has to be "public" - users can see it listed on your site only when its not private.
    Workaround here again placing this shortcode on that page:

    [ms-membership-buy id="10"]

    instead of the [ms-membership-signup] - so you will have direct link for joining private subscription.

    If I go to: http://162.144.60.226/~taggedbyanangel/2907-2/

    Note: My short code for the button on the page does not display.

    That page returns 404 now - what shortcode are you trying to use there?

    Q: is this related to Issue 3 and does this too need an MU plugin to work?

    Unfortunately this is cause by the fix that allows users to register :slight_frown: - there is conflict between script from that login form and other registration and login forms, because of the same ID in passwords fields.
    Workaround would be to replace login form from the theme with Membership 2 login form shortcode - or ask theme developers which script handles validation for that login form and then replace id of the password field to new one, that wont be causing conflicts and allow it to work.

    kind regards,
    Kasia

  • David

    Hi and thanks for the continued support.

    Re the issue of the text on the page. I feel comfortable patching the files if you can tell me which ones and ~which lines.

    Please review screen cast : http://screencast.com/t/ASNldiZhM

    This may better explain my position on this.

    RE. the registered user and the login process: QUESTION: you mentioned applying short code on "that page". Which page is "that page"?

    Note: I think this process has a resolution. This is a 5 minute screen cast and an optional watch but it shows all the ways by which I may get to the target resolution: http://screencast.com/t/F6LxU4xD

    Re issue 3, the login problem at the top. I have submitted your suggestion to the theme developer.

    Re: Workaround would be to replace login form from the theme with Membership 2 login form shortcode.

    Q:: what short code? Can you please provide it? Note: I see no login/logout page that is provided by Membership 2 Pro.

    Refer to screen cast: http://screencast.com/t/e2CHD7841

    Thank you for your time and attention. We are getting there.

  • Kasia Swiderska

    Hello David,

    I'm sorry for the delay on my end.

    Re the issue of the text on the page. I feel comfortable patching the files if you can tell me which ones and ~which lines.

    There is one more way of changing those text strings without using plugin and without changing plugin code (especially that there will be new update soon and all your changes will be removed).
    This can be done with using fake translation files - you translate Membership 2 Pro from English to English and actually you just change strings you want to be changed. In plugin directory in languages there is pot file and with application PoEdit (free https://poedit.net/ ) you can create po and mo files for your English - change text strings ("translate" them) and the upload to /wp-content/languages/plugins (if this directory doesn't exists you have to create them). This way WordPress will use "translated" strings instead of the original ones.

    RE. the registered user and the login process: QUESTION: you mentioned applying short code on "that page". Which page is "that page"?

    I meant page with membership list - one you mentioned in your original question here:

    http://162.144.60.226/~taggedbyanangel/memberships/
    but there is no link to the memberhsip plan as it is a private plan (as mentioned at the outset of the ticket)...

    this is normal WordPress page and you can edit it (there is membership list shortcode and it can be replaced).

    Q:: what short code? Can you please provide it? Note: I see no login/logout page that is provided by Membership 2 Pro.

    If you take a look on this page in your WordPress admin /wp-admin/admin.php?page=membership2-help&tab=shortcodes you will get list of all available shortcodes for Membership 2 pro.
    Login shortcode is [ms-membership-login] - and can be used as part of the theme:

    `<?php echo do_shortcode('[ms-membership-login]'); ?>

    so default theme login form can be removed (code of it) and replaced by the shortcode from Membership. This way there will be no more conflicts - thou design will be different than themes form.

    kind regards,
    Kasia

  • David

    HI.

    Re. The ongoing login issue.

    I created this page and included the short code: http://162.144.60.226/~taggedbyanangel/memberships/

    Note: Nothing displays.

    Question: what file am I supposed to add this code to?

    <?php echo do_shortcode('[ms-membership-login]'); ?>

    In regards to asking the them developer for assistance.

    You suggested I ask them this:


    Ask theme developers which script handles validation for that login form and then replace id of the password field to new one, that wont be causing conflicts and allow it to work.

    This is their reply:

    Hello David !
    Entry form and entry form through social networks this is element of design in the theme , this means that we have just shown that this is possible with our theme all further configuration you need to do yourself.
    I can only tell where these files are located :
    wp-contentthemesorganicstemplatesheaders_parts
    in the folder _parts =>
    files => login.php , register.php

    I'm not certain what to do based on this reply.

    If I could please hear back both about your solution and re. the original files and how to adjust them I'd appreciate it.

  • Kasia Swiderska

    Hello David,

    I created this page and included the short code: http://162.144.60.226/~taggedbyanangel/memberships/

    Note: Nothing displays.

    I've taken a look on that page and it is default membership page that Membership creates with standard [ms-membership-signup] shortcode - and that shortcode will not display private membership (please see my answer here https://premium.wpmudev.org/forums/topic/membership-2-funcionality-issues#post-1095165 )

    Question: what file am I supposed to add this code to?

    Basing on the response form theme developers it should be wp-content/themes/organics/templates/headers_parts/login.php that has login form code. I cannot check that with support access because WordPress editor doesn't show nested files.

    Regarding answer from theme developer - they did not answer question about the validation of the form. Question was about validation script and not template parts so this leaves us nowhere at the moment.
    Lets try with login.php file - please use pastebin.com and show me content of that file.

    kind regards,
    Kasia

  • David

    HI.

    RE: I've taken a look on that page and it is default membership page that Membership creates with standard [ms-membership-signup] shortcode - and that shortcode will not display private membership

    As per the objective, I just need the login function to work up top. If the suggestion is to use an alternative page then I just need a login screen for ANY page as the goal is not to see the membership pages but rather just to be able to login as a registered user which I cannot do using the theme code in conjunction with the MU plugin as has been discussed. How do we work around this?

    Per the request to deliver login.php from wp-content/themes/organics/templates/headers/parts/login.php

    I don't know what pastebin.com is but I will look into it. Here is the code from that page:

    <div id="popup_login" class="popup_wrap popup_login bg_tint_light">
    	<a href="#" class="popup_close"></a>
    	<div class="form_wrap">
    		<div class="form_left">
    			<form action="<?php echo wp_login_url(); ?>" method="post" name="login_form" class="popup_form login_form">
    				<input type="hidden" name="redirect_to" value="<?php echo esc_attr(home_url()); ?>">
    				<div class="popup_form_field login_field iconed_field icon-user"><input type="text" id="log" name="log" value="" placeholder="<?php esc_attr_e('Login or Email', 'organics'); ?>"></div>
    				<div class="popup_form_field password_field iconed_field icon-lock"><input type="password" id="password" name="pwd" value="" placeholder="<?php esc_attr_e('Password', 'organics'); ?>"></div>
    				<div class="popup_form_field remember_field">
    					<input type="checkbox" value="forever" id="rememberme" name="rememberme">
    					<label for="rememberme"><?php esc_html_e('Remember me', 'organics'); ?></label>
                        <a href="<?php echo wp_lostpassword_url( get_permalink() ); ?>" class="forgot_password"><?php esc_html_e('Forgot password?', 'organics'); ?></a>
    				</div>
    				<div class="popup_form_field submit_field"><input type="submit" class="submit_button" value="<?php esc_attr_e('Login', 'organics'); ?>"></div>
    			</form>
    		</div>
    		<div class="form_right">
    			<div class="login_socials_title"><?php esc_html_e('You can login using your social profile', 'organics'); ?></div>
    			<div class="login_socials_list">
    				<?php echo trim(organics_sc_socials(array('size'=>"tiny", 'shape'=>"round", 'socials'=>"facebook=#|twitter=#|gplus=#"))); ?>
    			</div>
    			<div class="login_socials_problem"><a href="#"><?php esc_html_e('Problem with login?', 'organics'); ?></a></div>
    			<div class="result message_block"></div>
    		</div>
    	</div>	<!-- /.login_wrap -->
    </div>		<!-- /.popup_login -->

    Note, I have attached the file as well. I hope this helps.

  • Kasia Swiderska

    Hello David,

    OK, this is right file. Please replace that code with this one http://pastebin.com/xQwiMpx0 (I use pastebin.com because it has colors and its easier to read)

    <div id="popup_login" class="popup_wrap popup_login bg_tint_light">
        <a href="#" class="popup_close"></a>
        <div class="form_wrap">
            <div class="form_left">
    <?php echo do_shortcode('[ms-membership-login]'); ?>
            </div>
            <div class="form_right">
                <div class="login_socials_title"><?php esc_html_e('You can login using your social profile', 'organics'); ?></div>
                <div class="login_socials_list">
                    <?php echo trim(organics_sc_socials(array('size'=>"tiny", 'shape'=>"round", 'socials'=>"facebook=#|twitter=#|gplus=#"))); ?>
                </div>
                <div class="login_socials_problem"><a href="#"><?php esc_html_e('Problem with login?', 'organics'); ?></a></div>
                <div class="result message_block"></div>
            </div>
        </div>  <!-- /.login_wrap -->
    </div>      <!-- /.popup_login -->

    As you see I replaced themes login form with <?php echo do_shortcode('[ms-membership-login]'); ?> - so from now it will be using Membership native login form. It might need bit of styling, but we will see that when it will start to work.
    Please be sure you have copy of the file before you start making any changes.

    kind regards,
    Kasia