Subscriptions: Log In Button Errors

Hi there. For users to log in and purchase a subscription, I’m having 2 issues:

(1) Login Modal Issue: Right now, if a non-logged in user goes to my site’s subscriptions page (/s), there’s a note that says “Log in or create an account to subscribe.” Then there is a Log In button.

However, if the user hits that Log In button, it doesn’t open the log in modal. Rather it goes to the /login page, and shows the “Oops! This page doesn’t exist” error.

Can this be fixed, so that the Log In button on the page opens the modal?

(2) Payment confirmation page: When a user successfully enters their payment information and purchases a subscription (in my case, it’s a 1 time fee to join), the site redirects them to the /billing/payments page. Can we redirect them somewhere else, such as the page for the group they just got access to?

The payments page is not a very exciting spot to go right after you’ve made your purchase.

Also, I’m having a bunch of issues with that page. For users for which the page works, under billing/payments, it says “There are no payments”. Which is not correct, because they are going there after making their payment.

For other users, this page does not even load, and the user gets the error: “Error while trying to load /s/user/payments”. This one could have something to do with things specific to the particular user. I have a few user accounts I use to test stuff out, and its using some of these accounts I get the error, so maybe it’s a stripe thing where theres an error if a user was used for test payments, and then later used for real payments.

1 Like

I’ll try to take a look at this today. Can you post any errors from /logs you’re seeing?

2 Likes

Thanks.

  1. Login Modal: Going right to the page [mysite.com]/login produces this error in chrome and safari:
    Uncaught DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL 'https://g/' cannot be created in a document with origin 'https://[mysite.com]' and URL '[mysite.com]/login'

  2. Billing/Payments page: I get no error on redirect to this page from purchase subscription page, and I also get no error, even though the page incorrectly says “There are no payment” despite the fact that the user has made a purchase.

1 Like

Interesting. I just tested this out locally with the most up to date versions of Discourse and the plugin, and I’m not seeing any of these issues.

Would you mind PMing me a link to your site so I can have a look?

3 Likes

After having a look, unfortunately, this isn’t a Subscriptions issue. There are customizations on your site that are interfering with the redirections used in this plugin on the front-end. When using safe-mode, all is working properly.

I’d recommend having a look at the methods your code ties into so it can properly work with the plugin. If you need some help, feel free to post in dev or if you have a budget, we have experienced developers who can help in marketplace :smiley:

Sorry I couldn’t be of more help on this one.

3 Likes