Membership2 sign up not redirecting correctly

Firstly, I am using the homepage as my register page. The homepage have the proper shortcode:

[ms-membership-signup membership_signup_text="Sign Up"]

However, in the registration form, after fill all the required fields, the user is redirected to the homepage and the registration is not complete.

Changing the register page to the default one (/ register), that have the same shortcode as the homepage, the registration process works better, but returns and error:

"Please ensure that the Date of Birth information is completed."

I created a profile field on Buddypress called "Date of Birth" that uses a "Date selector" field.

In Membership 2 -> Settings -> Profile Fields, when I set this field to be "required" on the "Registration Form" it returns that error, only works if I set it to "optional".

  • Adam Czajczyk

    Hello Dr. Berge

    I hope you're well today and thank you for your question!

    As for the member being redirected back to homepage and not not registered. I've just registered on your site with no issues. You can see that there's "adamwpmutest1" account with a "... Free for Three" membership assigned properly.

    Did you manage to solve that or is that directly related to the "data selector" field being set to required?

    As for the "data selector" field. I tested this on my own setup with default Twenty Seventeen theme and no other plugins than BuddyPress and Membership 2 Pro active and I can confirm the issue. I consider it a bug (most likely some "glitch" in form validation) so I have already reported it to our developers and they'll investigate that and work on a fix for the plugin.

    Kind regards,
    Adam

  • Dr. Berge

    Hi Adam,

    Thank you very much -- yes, as a work around, the 'date of birth' was removed (i.e. to not required) as a temporary fix (since this was stopping registrations, entirely) -- however having this feature is important, so hopefully fixed soon :slight_smile:

    FYI for the developers -- this is actually a reoccurring issue -- it happened a few months ago and the same glitch happened -- it was eventually fixed, but its happened again -- and 'why' I knew how to temporarily fix.

    Thanks again!

  • Dr. Berge

    Hi Adam,

    Reoccurring issue (again) -- hopefully you're able to help:

    Basically Sign Up (topicthread.com) is not working, and the same shortcode is on topicthread.com/register -- but it is displaying differently (i.e. in a 'form) then once the form is completed says 'email sent to confirm' (something like that) -- but the email doesn't send (I didn't set this up, I'm guessing somewhere in the help threads this was opted in and I noticed it).

    The biggest problem ****sign up is not working*****

    I followed advice on other threads and removed the FREE membership (trial, however was set up differently) and created NEW memberships where their was a 'free trial' to begin then it reverts to the paid membership (you can see this in the 2 x free memberships) -- but regardless -- this isn't fixing anything, only giving users now the option to choose what 'free trial' they want... (CSS was added in the snippets plugin to show/not show for logged in users -- this is really where the only changes have been made) -- the thing is prior to the update and support help 29th March and prior -- all was working fine; but now, nope -- the plugin conflict test was done on the 29th (ish) and Membership2 was found to be the culprit -- initially turning date of birth off was the temporary fix -- but now this isn't helping...sign up hans't worked since, so there's something not behaving in Membership2 -- and I'd really like users to be able to sign up again rather than getting a dead-end...

    Please help :slight_smile:

    I would love the registration form to be seen on the 'home page' over the sign up options (like what the register page looks like, now) -- it's just that neither are working (I just like the layout and have no clue how it appeared!)...

    Thanks Adam, reallyyyyy hope you can come to the rescue here!

  • Predrag Dubajic

    Hi Dr. Berge,

    I was doing some extensive testing by installing same plugins and theme as on your installation, and after importing the page setup from your installation I was able to replicate the issue, and it seems that the issue is related to your theme or page builder and the way it renders the shortcodes on the page.

    When I check your Welcome Home page the content seems ok, the default M2 shortcode is added in the text element properly:
    [ms-membership-signup membership_signup_text="Sign Up"]

    Now, while testing this further on my installation I noticed something strange, when I switched to default WP theme and disabled all the plugins the content of the Welcome Home page is nothing as it was before.
    That is expected when you switch off the theme builder and it usually just leaves shortcodes or some HTML it uses to build custom page, but in your case, it completely changes the page content.
    Since it's too large to paste it here I've added it to pastebin and you can see there how the page looks after disabling everything:
    https://pastebin.com/vehdL5iZ

    It might look like the HTML structure left over but if you search for M2 shortcodes you will see they are nowhere to be found on that page.
    It seems that your theme or page builder actually renders the shortcode while still being in backend and then just transfers HTML on the frontend of the site.
    However, this means that the other functionalities of M2 shortcodes are not being properly loaded on the frontend and that's why it doesn't work.

    If you don't use page builder and add the shortcode only so it renders on frontend as with regular WP themes everything will be working fine.

    I'm afraid that this is not something we can fix as it's related to the way your theme/page builder works and you will need to contact respective developers for more information about this and see how the page structure can be kept in backend as WP usually handles it.

    Let us know how it goes.

    Best regards,
    Predrag

  • Dr. Berge

    Dear Predrag,

    Firstly, thank you very much for helping -- it's really strange...
    I just went ahead and reverted the home page to text over 'page builder' and the Membership2 sign up still does not work -- same for the register page?
    So I wanted to clarify -- did you mean the theme? I have also had an update for the page builder plugin that I just applied and there are no changes -- so again, do you mean the theme?
    When a plugin conflict test was run a few days ago, Membership2 was found to be the culprit?
    This isn't really adding up..
    Then initially last week everything was working then 'stopped' all of a sudden but by turning of the 'date of birth' profile field -- it worked again..
    But now...turning the 'profile field' on or off does nothing?
    Again...not adding up?
    Further, the output of the register page has the same shortcode as the home page -- but the output is different? This too...is very odd?
    Confirming --- the 'theme' and not 'page builder' (plugin) itself -- and the underlying issue appears to be "page structure can be kept in backend as WP usually handles it"?
    I'm a little confused Predrag because of all the issues popping up with Membership2, so your help would be appreciated in further unravelling this...

    Thank you kindly

  • Predrag Dubajic

    Hi Dr. Berge,

    The issue with Date field doesn't seem related to the one I was referring to in my previous comment, that's something that Adam was able to replicate without page builder and is already reported to our developers for further investigation.

    About the current issue, when you turn off your editor the backend content is already changed, you can see that it doesn't have any M2 shortcodes on the page anymore, and instead of showing the shortcode it actually renders it right there and shows the HTML structure.

    Here's how you can see the issue, I've created a clone of your home page, called Welcome Home2, and in that page I switched to normal WP editor but replaced the code that page builder rendered and replaced it with proper M2 shortcodes.

    I've set it to private so it's not accessible for visitors now, so you can go to edit that page now, set it to Public and publish it.
    After that go to Settings > Reading and set that page as your homepage.
    Then go to Membership 2 > Settings and set that page as Registration page.

    Now when that new page is selected go to your Home page on frontend and click on Sign Up button for any membership, you will see that it now works properly and shows registration form.

    As you can see, when the M2 shortcodes is not affected by your page builder in the backend it works properly.

    Best regards,
    Predrag