Existing members can't purchase without creating a new account

Hi JediShark,

I really appreciate your help with this.

The URL is https://www.tentononline.com/enroll-test/

And on my testing server, I tried switching to the 2017 theme and disabling ALL plugins except S2Member Pro (v190822). I still get the “Create Profile” section.

I haven’t gone the clean WP install route yet…

My host is WP Engine if that helps…

If that is the ENTIRE URL for a logged-in user (and not just the permalink to the page) then the query parameters are missing. I’m not sure what they should be, but @clavaque would know. I haven’t looked at one of these forms for a while, but judging from the source on your page the profile is supposed to show up but it is supposed to be pre-populated with the logged-in user’s info.

So, please verify that you copied that URL from the page after following whatever link you had on the site as a logged-in user. If that is not the case, please try again and include all of the query parameters in the URL.

Okay, maybe I’m testing this incorrectly. Let me get back to you…

When a logged in user navigates to an “enroll” page (that contains the PayPal Pro-Form generated code), they’re asked to create a new account.

You can use the same form for an existing user without requiring him to create a new account. If he’s logged in, the pro-form is just for payment without signup, even the level pro-forms.

Those fields are shown or not with JavaScript, and I’ve seen fields show up incorrectly when there’s a JS problem. I suspect that you have something messing up your JS.

When you’re logged in to your admin account, are you being asked for the password and other signup fields? That should not happen.

Do you see any warnings or errors in the browser’s Web Console? If you give me a link to the page, I can check.

Could you troubleshoot deactivating other plugins/theme to remove variables and narrow it down?

Since you should be able to see a change in behavior while logged in to your admin account, this plugin may be helpful: https://wordpress.org/plugins/health-check/

I look forward to your update. :slight_smile:

Hi Christian,

Thanks very much for jumping in. You’ve helped me in the past, and your support is fantastic. To answer your questions…

Those fields are shown or not with JavaScript, and I’ve seen fields show up incorrectly when there’s a JS problem. I suspect that you have something messing up your JS.

I do strongly suspect there is a JS problem…and that this is our culprit. Unfortunately, I don’t know how to troubleshoot / resolve something like this (JS isn’t my strong suit).

When you’re logged in to your admin account, are you being asked for the password and other signup fields? That should not happen.

Yes. So when I’m logged in as admin and I navigate to a page (like the links I’ve included below) that contains S2Member shortcode generated from either PayPal Pro-Forms > Billing Modification or PayPal Pro-Forms > Capability (Buy Now) Form, the sign up forms display the Create Profile area (including First Name, Last Name, Email Address, Username, and Password fields)

Here are the two test pages I’ve set up (and their PayPal Pro-Forms generated shortcode:

https://www.tentononline.com/enroll-test-billing-modification/

[s2Member-Pro-PayPal-Form modify=“1” level=“1” ccaps=“my_ccap” desc="$1 USD + tax / One Time (for lifetime access, non-recurring, no trial)" ps=“paypal” lc="" cc=“USD” dg=“0” ns=“1” custom=“www.tentononline.com” ta=“0” tp=“0” tt=“D” ra=“1” rp=“1” rt=“L” rr=“BN” rrt="" rra=“2” accept=“paypal,visa,mastercard,amex,discover,maestro,solo” accept_via_paypal=“paypal” coupon="" accept_coupons=“0” default_country_code="" captcha=“0” /]

https://www.tentononline.com/enroll-test-capability-buy-now-form/

[s2Member-Pro-PayPal-Form level="*" ccaps=“my_ccap” desc=“Description and pricing details here.” ps=“paypal” lc="" cc=“USD” dg=“0” ns=“1” custom=“www.tentononline.com” ra=“1” rp=“1” rt=“L” rr=“BN” accept=“paypal,visa,mastercard,amex,discover,maestro,solo” accept_via_paypal=“paypal” coupon="" accept_coupons=“0” default_country_code="" captcha=“0” /]

Do you see any warnings or errors in the browser’s Web Console? If you give me a link to the page, I can check.

I’m digging into finding this out right now. Again not my area of expertise…but would you mind checking the above links on your side? Again, I’m strongly suspecting a JS error of some kind.

Could you troubleshoot deactivating other plugins/theme to remove variables and narrow it down?

Yes, on my testing server I deactivated ALL plugins except for S2 Member, and I tried switching to the 2017 theme. I still got the Create Profile area appearing. So that rules out plugins and my theme.

Thanks – look forward to your thoughts on this!

Looks like the pages are loaded with JS errors…But, I tried disabling JS in my browser and I still see the Create Profile section when logged in…

I just copied everything over to my staging server, disabled all plugins except S2Member and switched the theme…still seeing JS errors…

Hi Christian, Some help on this would be really appreciated. Thanks -Geoff

That’s very strange. There has to be something extra causing this on your installations. Do you have other customizations? Like must-use plugins, maybe… /wp-content/mu-plugins/

Can you reproduce this behavior in a clean installation of WP with just s2 added?

:slight_smile:

I was hoping to be able to dig into the console and troubleshoot some JS, but looked at all the urls listed above and it all seemed great, except for some plugins exposing console notices unnecessarily on other pages.

@Christian: Yes, I do have an /wp-content/mu-plugins/ folder with a few plugins there…

force-strong-passwords [folder]
wpengine-common [folder]
health-check-troubleshooting-mode.php
mu-plugin.php
slt-force-strong-passwords.php
stop-long-comments.php
wpengine-security-auditor.php

…anything there look odd to you?

On my staging server, I tried renaming / deleting this folder…no effect.

I have yet to try testing on a clean install of WP.

@Ric: Thanks very much for taking a look…No errors, really? Can you tell me how you’re checking?

I’m curious about the mu-plugin.php one.

I look forward to that, because then we remove many variables. Once you get it working, you can add back back plugins/theme and testing to find what introduces the problem.

:slight_smile:

Sorry for being out of touch…tied up on another project.

Here’s the contents of mu-plugin.php: https://pastebin.com/g4HucNR9

As for testing on a clean install, I’m unsure of the best way to go about this. If I duplicate the site on my staging server and then deactivate all plugins except S2 and switch themes, the problem persists (as reported earlier).

But I do have a clean install of WP on another server, but don’t know the best way to begin re-introducing plugins…would uploading them one at a time via FTP be the best method?

Yes, you can do that. In that clean installation of WP with just s2, can you reproduce the problem or it’s not there?

If not there, then add plugins and test after each, or for speed add a bunch and if the problem comes back, then you pick them one by one. If the problem is not back, then add another bunch.

:slight_smile:

Okay thanks Cristian. I’ll give that a try and report back my findings. In the meantime, anything noteworthy in mu-plugin.php?

I’ve had issues with every managed host I’ve tried getting along with s2 except for Kinsta. I’ve never tried WPengine, though.

s2 seems to be very picky about caching.

Thanks Ric…

I got thinking about the hosting issue as I have had caching problems with WP Engine in the past.

So as a test, I migrated my site to Flywheel. This didn’t resolve my issue. I deactivated all the plugins (except S2) and changed the theme…still didn’t resolve the problem.

So I think this rules out web hosting as the root of the problem.

(As an aside, what’s your take on Kinsta? Happy with them?)

Before I go to the effort of manually adding plugins back in as Christian suggests, is it possible to narrow down what might be the problem? For instance…

  • Javascript (but I think we ruled that out?)

  • something in functions.php?

  • mu-plugins (did we rule that out?)

  • something else?

Thanks

If you remove every other plugin and you still have the behavior, then you don’t need to add them back some at a time and test after each, because they don’t seem to be what’s causing the issue.

You still have the issue, so it’s something else that’s still there having an effect. Although I don’t see as many errors in the console, the pro-form’s JS is not working, so something’s affecting it.

I would check the must-use plugins, move those to another folder, leave the /wp-content/mu-plugins/ folder empty, and test again.

Change the theme to the default one, and test again.

Let me know how it goes with those tests, please. :slight_smile:

I had caching problems with Flywheel too (if you search here for “Flywheel” you’ll see :)).

Kinsta seems great so far. It’s literally the first WP managed host with aggressive caching that I’ve tried that works with s2.

Oh, and WP-Engine == Flywheel now.