Subscriptions plugin now sends newly logged-in users directly to contributors page, which doesn't exist

For a couple of weeks now, logging in to my forum using normal uname/pwd creds takes me directly to a /s/contributors page, which doesn’t exist. Login actually works, but this appears momentarily:

image

and then forum members are redirected to this disconcerting message:

image

I haven’t done anything to the site make this redirect occur (just applied all the normal upgrades)- can anyone help me resolve this?

The error logs show this:


TypeError: e.plans is undefined
Url: https://foo.com/assets/plugins/discourse-subscriptions-e36523da482c3a11b8f5407c5ed5001ddc6fecc4528a555476e7a94814347753.js
Line: 1
Column: 1119
Window Location: https://foo.com/s/contributors

Many thanks!

1 Like

@Amicable this is odd and interesting to me. Would you mind PMing me the link to your site so I can scope it out?

/s/contributors is the route the Subscriptions plugin uses to get data about contributors for the new campaign banner, but we shouldn’t be redirecting there in any sense. There’s no codepath I’m aware of that does this.

7 Likes

@Amicable I’ve done some testing on this and I cannot reproduce this with login required enabled. I tried inviting users and setting new users up from scratch as well.

Are the users browsing to a subscription page initially? Something like /s/prod_xxxxxxxxxx? Or to /s?

Does the issue go away if the user clears their browser cache before logging in?

Do you have an install configured with our official install guide? Have you upgraded to latest after experiencing this?

@Amicable Did you recently try out the new auto-create campaign feature and deleted it soon after?

@justin Unable to reprod it now, but I encountered the same message when experimenting with it. There were remnants of the auto-created campaign under /admin/plugins/discourse-subscriptions/products, either the product itself or the plans within it. Once removed, logging in was restored to normal and no longer redirected to /s/contributors.

That’s helpful info @Kchalk – I’ll start messing around with that to see if I can get a repro. If you have exact repro steps, that would help too.

EDIT: I have a repro now.

  • Set the campaign banner location to Top
  • Site is login required

Shouldn’t be to do with the auto campaign creation feature, but specifically with the banner. Likely due to when the /s/contributors route is being called in the login process. Good thing is if you click the home logo you get right into the site, but I can see where this is concerning to end users…

2 Likes

@Kchalk yes, you may have sthg. I did experiment with banners at the top of each page but scrubbed it.

@justin I recall trying a banner a few months ago, but never implemented it. The use case for it was to have it appearing at the top of each page, so that seems to match @Kchalk 's discovery.

The screenshots I showed ^ are visible to all users immediately after logging in.

The whole install is very vanilla, very few customisations & plugins. It was created following the install guide, but that was a few years ago now.

We still have the subs plugin disabled and likely won’t be reactivating it until the use case for it arises again.

We’ll get it fixed up so there is no longer an issue on login-required sites. :slight_smile:

5 Likes

I logged into our demo site https://lets.trydiscourse.com as an admin after a while, and saw the same problem too. Feel free to use the site for testing!

Fix was pretty simple and is up in a PR here!

5 Likes