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

**URL:** https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874
**Category:** Bug
**Tags:** subscriptions
**Created:** [June 15, 2021, 10:22am UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874 "2021-06-15T10:22:55Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Amicable](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amicable/32/68902_2.png) [@Amicable](https://meta.discourse.org/u/Amicable)
#### Post date: [June 15, 2021, 10:22am UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/1 "2021-06-15T10:22:55Z")

</div>

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](https://global.discourse-cdn.com/meta/original/3X/6/3/636a0b5db96dd1cf675ff75d44591780dd66f20c.png)

and then forum members are redirected to this disconcerting message:

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/6/8638d2d4861ea3a68e3076463a93dd0bd4b9cc23.png)

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:

```plaintext

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!

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [June 15, 2021, 2:31pm UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/4 "2021-06-15T14:31:45Z")

</div>

@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.

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [June 21, 2021, 1:59pm UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/5 "2021-06-21T13:59:28Z")

</div>

@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](https://meta.discourse.org/t/142537?silent=true) guide? Have you upgraded to latest after experiencing this?

---

<div class="post-metadata">

### Author: ![Kchalk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kchalk/32/226787_2.png) [@Kchalk](https://meta.discourse.org/u/Kchalk)
#### Post date: [June 21, 2021, 4:45pm UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/6 "2021-06-21T16:45:12Z")

</div>

@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`.

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [June 21, 2021, 5:08pm UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/7 "2021-06-21T17:08:12Z")

</div>

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..

---

<div class="post-metadata">

### Author: ![Amicable](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amicable/32/68902_2.png) [@Amicable](https://meta.discourse.org/u/Amicable)
#### Post date: [June 21, 2021, 9:15pm UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/8 "2021-06-21T21:15:34Z")

</div>

@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.

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [June 21, 2021, 9:44pm UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/9 "2021-06-21T21:44:07Z")

</div>

> [@Amicable](#):
>
> 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. 🙂

---

<div class="post-metadata">

### Author: ![rishabh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rishabh/32/179446_2.png) [@rishabh](https://meta.discourse.org/u/rishabh)
#### Post date: [June 22, 2021, 11:07am UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/10 "2021-06-22T11:07:01Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [June 22, 2021, 2:54pm UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/11 "2021-06-22T14:54:32Z")

</div>

[https://github.com/discourse/discourse-subscriptions/pull/80](https://github.com/discourse/discourse-subscriptions/pull/80)

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

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [June 23, 2021, 8:39pm UTC](https://meta.discourse.org/t/subscriptions-plugin-now-sends-newly-logged-in-users-directly-to-contributors-page-which-doesnt-exist/193874/12 "2021-06-23T20:39:44Z")

</div>


