ProSites - Page not found error after user submits payment info

My users are getting a page not found error upon completing the registration process. They enter their site info, then payment info, then when they submit, a 404 loads.

I have gone back over the Pro Site settings to double check I haven't missed something and I can't find anything. This was working previously though I am not 100% certain when exactly it broke.

I have granted support access, should you need it.

    Milan

    Hello Erica

    Hope you are well today and thanks for asking us.

    As it was working yesterday, Is there any changes you made after that ? Plugin or theme update ? Something like that ? If yes, what are those ?

    If no, then please conduct plugin conflict test as described in our this support manual as flowchart.
    https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Looking forward to hearing back.
    Best Regards,
    Milan

    Erica

    On my staging environment, I deactivated all plugins except Pro Site, and switched my theme to twenty fifteen. The issue still occurs. After I hit submit in the checkout, the site seems to redirect to another page, but the URL reads mydomain.ca/pro-site/ (which is a page that does exist - it's the page the registration form is on) and a 404 error appears. The really strange thing is that the registration form on my staging environment redirects to my live domain - leads me to think there's a setting somewhere within pro sites causing this but I haven't been able to find it. Any advice?

    I believe you should have support access on my staging environment as well and you are welcome to play with anything there as it won't affect my live site.

    Milan

    Hello Erica

    Thanks for your extended permission for your staging site.

    But to test there, I would need staff access to your site. I can't see that you've granted it on your staging site. Please grant it.

    Furthermore, it would be good if you enable debug mode on your staging site. To enable debug mode on your staging site, open wp-config.php file, and set WP_DEBUG constant's value to true there.

    define ( "WP_DEBUG", true );

    Looking forward to hearing back.
    Best Regards,
    Milan

    Dimitris

    Hey there Erica,

    hope you're having a beautiful day and don't mind chiming in.

    Access had already been granted on my staging site (http://frenchquest.dev.onpressidium.com/) but I have extended it again, perhaps that will help. Debugging is enabled.

    I can truly access your staging environment, appreciate this!

    The really strange thing is that the registration form on my staging environment redirects to my live domain - leads me to think there's a setting somewhere within pro sites causing this but I haven't been able to find it. Any advice?

    This should be happening due to the staging creation process. Could you please install the Better Search Replace plugin and perform a find&replace action (find live URL, replace it with staging URL).
    Please inform us when you'll perform this action so that we can continue debugging without any issues.

    I also want to ask you if we can change the payment gateways with our own sandboxes accounts to further test the register/payment procedure.

    Kind regards,
    Dimitris

    Adam Czajczyk

    Hello Erica!

    I checked your staging site and it seems that the "search and replace" did work after all as I wasn't redirected to your live site during signup testing.

    I set my own Stripe test credentials and checked Pro Sites signup. I can confirm that it returns "not found" message but that's not a "redirect error". Instead, the site didn't get created at all. Knowing that I reviewed site settings, giving Pro Sites configuration a special attention everything there seems to be correct.

    Most plugins are disabled as well but I found that there are four plugins that work as MU Plugins:

    - Limit Login Attempts (no known issues here)
    - Enforce Strong Passwords
    - mc_admin_user_caps.php
    - Pressidium(r) Agent

    I tested the "Enforce Strong Passwords" and "Limit Login Attempts" on my own setup and they did not interfere but still - I don't exclude them as they are working along other two plugins on your site and are also installed as MU plugins.

    Unfortunately, I'm not familiar with Pressidiom platform and don't have access to it and I don't know what the "mc_admin_user_caps.php" plugin does (I can only guess).

    Having said that all, I think it would be good to disable those four plugins as well and then test Pro Sites signup. If it works, add one of the plugins and see if the process brakes.

    To disable all MU plugins please access your site via FTP and then:

    - go to /wp-content/mu-plugins folder
    - download all the folders and files inside (in order to be able to bring them back)
    - remove those folder and files from server (while keeping them on your local drive)

    To enable them again just upload plugin file/folder to the "/wp-content/mu-plugins" folder.

    If it comes to testing: I noticed that your Stripe gateway in Pro Sites settings is currently set to "No SSL (Testing)" which is testing mode. However, in order to use it you will also want to put testing Stripe API credentials there instead of live credentials as Stripe is using two different sets of credentials.

    Let me know about test results please.

    Best regards,
    Adam

    Erica

    I cannot delete the MU plugins. They are required by my managed host (pressidium) and as soon as I delete them, they're automatically re-added.

    I know these plugins have nothing to do with the issue though because they have not changed and they were present when Pro-Sites worked previously.

    I know this is not a Stripe-specific issue, too, because I had been using PayPal exclusively up until recently and only recently added Stripe in an attempt to solve this issue.

    Dimitris

    Hey there Erica,

    hope you're having a beautiful day!

    Could you please try the following steps:
    - save permalinks in main site and test
    If this continues try to:
    - delete (and remove from Trash) the Pro Sites page
    - go to Pro Sites > Settings and save the settings so that a new Pro Sites page is created
    - test again

    Looking forward for your results on this!
    Warm regards,
    Dimitris

    Adam Czajczyk

    Hello Erica!

    Thank you for re-granting access.

    I visited your site and run more tests on it using both PayPal and Stripe payment gateways with my own test credentials (so I could check gateway logs as well). The PayPal gateway seems to be working as expected - the payment goes through and both user account and site gets created.

    With Stripe however, there's still an error, even though Stripe seems to be calling an existing URL on your site. The site doesn't get created though.

    I tested this all on your staging site but still there's some more tests I'd like to conduct. Since this is a staging site I understand that I'm allowed to make any changes there that I find necessary. Can you please confirm that before I go any further? I'd like to make sure that I won't interfere with any of your activities there and also that I won't get in a way an other developer and/or support team (so if there are other threads of yours here where we are using staging site please let me know about them).

    Best regards,
    Adam

    Adam Czajczyk

    Hello Erica!

    Thank you for confirming this. It's extremely helpful!

    Meanwhile though I came across another report of a similar issue. This may or may not be related, I'm not sure yet but for now it seems like we may be tracking down a bug. That's why I'd like to ask you to let me access your staging site in a more direct way so I could first run some other tests and then engage developers if necessary.

    That being said, please send in:

    Subject: "Attn: Adam Czajczyk"

    - Mark to my attention, the subject line should contain only: ATTN: Adam Czajczyk
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - login URL and admin account login credentials (may be a temporary admin account) data
    - Include FTP log-in details (hostname, username & password)
    - Include hosting control panel access details (login address, username & password) - cPanel's usually the control panel used for this, but your provider may use something else; I'll need this for accessing your site's database, preferably via phpMyAdmin
    - Include any relevant URLs for your site

    Please use our contact form here http://premium.wpmudev.org/contact/

    Select "I have a different question" from the drop-down list

    Please be sure to make a full backup of your entire site first!

    Best regards,
    Adam

    Mahlamusa

    Hello Erica,

    I hope you are doing great today. I am sorry for the late reply from our side, things have be a lot busy here. As I was going through this I noticed that this thread is still open and I was wondering if you still need help with this.

    I have noticed that the Pro Sites plugin has been updated several times with lots of improvements and bug fixes since the last post on this thread. Did the issue get resolved by updating the plugin or are you still having the same issue even with the new version of the plugin?

    Please let us know if you still need help and we will always be happy to assist you in anyway possible.

    Please enjoy the rest of your day.

    Cheers,
    Mahlamusa

    Mahlamusa

    Hello Erica,

    I hope you are doing great today and thank you for getting back to us with regards to this. I am very sorry that this is not working out for you so far and I hope we get to the root of this and make it work for you and your visitors.

    I have done some tests on your staging site and I was unable to reproduce this error, so I can only assume you are having this issue on your live site. Unfortunately, I do not have access to your live site as I do not have the login details. If the staging site works then we should check the settings and active plugins on the staging site and make sure we have the same on the live site.

    Would you please grant support access on your live site so I can compare the two installs and see the difference, that might help us pin point the problem.

    During my test, I tested the three payment gateways: Stripe, PayPal and Manual Payments, I got no issues with all three of them. I have attached screenshot below to show the results after being redirected by the payment gateway back to the site.

    Stripe Gateway:

    PayPal Gateway:

    I had only successful registration and payment using all three gateways. Would you please confirm if you are having this issue only on your live/production website or you are experiencing it on the staging site as well. Please run a test and share the steps you followed along with screenshots so that we can see what you see, that will help us better understand the problem.

    I am sorry this is not resolved as yet, but I promise we will do the best we can to get to the bottom of this. We really appreciate your patience and cooperation while we try to solve this.

    I hope you enjoy the rest of your day.

    Cheers,
    Mahlamusa

    Mahlamusa

    Hello Erica,

    Thanks for your reply. I was able to compare the two installs and have seen that there are lots of plugins active on the live site but not active on the sandbox. This gave me a hint that those plugins that are not active on the staging site but active on the live site may be the course for this issue.

    So, I did a plugin conflict test to find and eliminate the conflicting plugin. I have found that the conflicting plugin is BadgeOS. I googled this plugin and found that it was also reported to have a conflict with "Paid Membership Pro" plugin of which it was causing the same "404 not found" issue after payment.

    I understand that you activated the BadgeOS plugin for a reason but I have a simple question: Does this plugin have to be on your main site, on the sub sites or both on your main site and sub sites? If this plugin is required by your sub sites then you should "Network Deactivate" the plugin then activate it on all the sites that need it. You can also activate it on the Blog Template you have created, this will make sure its activated on all sub sites created with the blog template.

    If you need BadgeOS on the main site or on all sites, then we will try to find a fix for the two plugins to be compatible. I have found this resource which addresses the same issue but with a different plugin not Pro Sites, please review it and see if it can't be useful for you. Please try this on the staging site or make sure you create an instant backup if you want to try on your live site.

    I am waiting for your reply so we can move forward. Enjoy your day further.

    Cheers,
    Mahlamusa

    Erica

    Thanks so much for your quick analysis and suggestion.

    I don't need BadgeOS on the main site, so I did as you suggested and network deactivated and just activated on subsites. You're right that activating it on the template site will work just as well as network activating - good call. I've had to manually go through and activate on existing sites, but that wasn't that time consuming.

    When I signed up for a new site this time, it did go through, but after it does, it just reloads the Pro Site registration page - there was no message to the customer to confirm payment, etc. or to direct customers where to go to login to their own site. How can I address this issue so that folks have a confirmation shown? (I seem to remember one appearing previously, last time Pro Sites was working right...)

    I also got TWO receipts. One from "WordPress" and one from "French Quest". They both have basically the same Pro Sites confirmation; however, one says I paid in USD and one says I paid in Canadian dollars (which is what it should be). When I log into my Stripe account, only the canadian dollars one actually went through... but as a customer, I'd be freaking out and assuming I'd been charged twice. How can I stop the duplicate email? It's the one from "WordPress" that is incorrect/duplicate.

    Perhaps I need to dig a bit more into the Pro Sites settings now. At least the main issue is solved!

    Erica

    Digging a bit further, the duplicate email mystery continues:
    - I tested registering a site on FrenchQuest.ca: received the proper and appropriate receipt from FrenchQuest
    - I also use Pro Site on EduQuest.ca and the duplicate receipt was from *that* site... how, I'm not sure.. but I'm guessing I've messed up the API settings somehow? Or is it not possible to have the same stripe account on two different Pro Sites? I did not actually get charged anything from EduQuest.ca and no site was actually created for me there.

    Mahlamusa

    Hello Erica,

    I hope you are doing great today and I am glad that things are starting to work.

    With regards to this:

    it did go through, but after it does, it just reloads the Pro Site registration page - there was no message to the customer to confirm payment, etc.

    I tried and got the same issue that you got but afterwards I went to the main site "Settings > Permalinks" and just saved twice. What this does is to flush and reset the rewrite rules on the website. I did this because BadgeOS was using custom post types and rewrite rules that affected the permalinks resulting in the original "404 not found" error, after saving the permalinks I tried again and it worked perfectly for me.

    I created a new site, I was redirected to a confirmation page that looks like this:

    Confirmation page:

    Welcome Email:

    This page includes: site and login link, username and password. I think resolving this automatically addresses your question: "How can I address this issue so that folks have a confirmation shown?"

    I received one payment receipt from "French Quest" that looks like this:

    This receipt is in Canadian Dollars, this is what is set on the Stripe Gateway Settings in Pro Sites. Unfortunately, I did not receive another receipt except this one. Stripe may automatically send its own receipts, so please check if that other receipt is not from Stripe.

    I also use Pro Site on EduQuest.ca and the duplicate receipt was from *that* site... how, I'm not sure..

    Do you mean that receipt was from EduQuest or FrenchQuest? The receipt should be from the site from which it was sent because it is sent by Pro Sites on that particular site. If you have configured the web hook on Stripe, then it will be a problem if you are using the same Stripe account on two Pro Sites installs.

    A successful payment on Stripe for EduQuest may end up calling the Pro Sites web hook on French Quest or vice versa, so to make sure everything runs smoothly, I think you have mad a good decision separating the accounts fro the separate installs, that will make sure the correct hooks are ran on the appropriate site to update subscriptions and sites on Pro Sites.

    Would you please do one more test on your side and let us know the results. If you run into any issues, it is advisable that you share screenshots of the current page with the issue so that we will be able to see what you see.

    I hope you enjoy your day further.

    Cheers,
    Mahlamusa

      Erica

      One last (?!) related question: I tested out the free trial and it looks like it's working; however, is there a way to modify the message that shows up in the customer's dashboard? When I was logged in as a newly registered member, the message I saw was a warning bar at the top of the dashboard saying something along the lines of "you have pending changes on this account. This message will disappear once the changes are no longer pending" (not an exact quote). I would expect that message would be something along the lines of "you have X days remaining on your free trial". Any way to fix this?

    Erica

    OK.. big issue.

    Every new user that signs up the payment process is not functioning. It's sending out a payment receipt right away, even though it shouldn't charge until after the trial. In my stripe dashboard, instead of creating a new entry for a new customer, it's just modifying the payment *I* created when I was testing if the system worked.... so no new customers get created, it just updates *my credit card* and overwrites my email address/name/etc, with the newest customer's info. I'm not sure if I'm explaining that properly. I can add screenshots later but I don't have time right this moment to black out the sensitive details (which is pretty much all of it so I'm not sure how to properly show you what I mean).

    Mahlamusa

    Hello Erica,

    I hope you are doing great today. I am glad things are starting to work as you expect on your website. I hope this finds you well.

    however, is there a way to modify the message that shows up in the customer's dashboard?

    The default message that should appear when a Pro Sites member is on a Trial subscription is the one that can be set on the general settings tab on your Pro Sites settings. See the screenshot.

    When this is rendered it should read as follows:

    You have 14 days left in your LEVEL free trial. Checkout now to prevent losing French Quest Pro features »

    The warning about pending changes seems to be related to pending payments. Can you please verify if that particular site is paid, trial or a manually created site. Once the Stripe Web Hook runs for your website, the payments will be marked as paid.

    With regards to the "Big Issue", please create a new ticket detailing the steps to reproduce the issue, provide as much details as possible on that ticket and it will be handled separately. It is always advisable to have one issue per ticket to make it easier for staff and members to follow the issue easily. I have noticed that you already created the ticket reporting this issue, it will be handled on that thread.

    I would advice you to check all your settings as you mentioned that you have two stripe accounts for your two networks. Please check on your stripe dashboard that the web hooks for each account is not mixed with the API details for the other site. Reply on the other thread as this one is already resolved for the initial issue it was opened for.

    I hope you enjoy the rest of your day.

    Cheers,
    Mahlamusa