# Registration modal/popup not showing up for private instance

**URL:** https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959
**Category:** Support
**Created:** [October 14, 2019, 1:56pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959 "2019-10-14T13:56:16Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![fkohrt](https://avatars.discourse-cdn.com/v4/letter/f/6de8d8/32.png) [@fkohrt](https://meta.discourse.org/u/fkohrt)
#### Post date: [October 14, 2019, 1:56pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/1 "2019-10-14T13:56:16Z")

</div>

Hi!

Somewhere while upgrading from `2.4.0.beta1` to `2.4.0.beta2` to `2.4.0.beta4` (not sure on which upgrade exactly) the registration modal stopped showing up for new users.

We use the OpenID Connect plugin to authenticate our users. Login is required, local logins are disabled and new registrations are allowed. Disabling the login requirement or enabling local logins “resolves” the issue and users may register again. Local logins should, however, stay disabled and we want logins to be required as well.  
The OIDC Log is normal and shows a `Fetched userinfo response` with the new user’s credentials although no modal shows up. I tried moving to a fresh install and restoring the backup, but the issue persists. Without restoring my backup, the modal shows up, so there’s something with my backup that makes this issue appear 😕

Our current Discourse version is `2.4.0.beta6`, where the issue is present as well.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [October 14, 2019, 2:27pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/2 "2019-10-14T14:27:18Z")

</div>

Do you have any theme components installed on the site? Does the issue persist in [safe mode](https://meta.discourse.org/t/how-to-use-discourse-safe-mode/53504)?

---

<div class="post-metadata">

### Author: ![fkohrt](https://avatars.discourse-cdn.com/v4/letter/f/6de8d8/32.png) [@fkohrt](https://meta.discourse.org/u/fkohrt)
#### Post date: [October 14, 2019, 6:48pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/3 "2019-10-14T18:48:11Z")

</div>

Fantastic, you were right! Removing the [Knowledge Base](https://meta.discourse.org/t/knowledge-base-theme-component/121898) component from the theme made the modal appear again! I obviously installed the component between one of those upgrades.

Strange enough, this is only true after I restore the backup, a clean install shows no such issue with the component enabled. I will just disable it, we weren’t using it anyways.

Thanks for helping out!

---

<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: [October 14, 2019, 6:56pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/4 "2019-10-14T18:56:13Z")

</div>

That’s really peculiar. Do you recall seeing any particular errors with that component, such as in the browser developer console?

---

<div class="post-metadata">

### Author: ![fkohrt](https://avatars.discourse-cdn.com/v4/letter/f/6de8d8/32.png) [@fkohrt](https://meta.discourse.org/u/fkohrt)
#### Post date: [October 14, 2019, 7:30pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/5 "2019-10-14T19:30:34Z")

</div>

Indeed, under `https://<HOST>/logs`, I read the following: `Uncaught TypeError: Cannot read property 'knowledge-base' of undefined`

 ![Screenshot_2019-10-14%20Logs](https://global.discourse-cdn.com/meta/original/3X/e/a/eadd1e3de49f874d56595ba87f6abeb31c80ebe2.png)

Additionally, there’s 8 times a `TypeError: E.idMap(...) is undefined`, but with no mentioning of the Knowledge Base component. It has the following backtrace (Url: `https://<HOST>/assets/application-301651b1c7400a000974a9cecafd44ad3304cf647cf17bcfa7af68e9ed1ac4b7.js`, Line: `9`, Column: `20924`, Window Location: `https://<HOST>/login`):

```plaintext
findById@https://<HOST>/assets/application-301651b1c7400a000974a9cecafd44ad3304cf647cf17bcfa7af68e9ed1ac4b7.js:9:20924
findByIds/<@https://<HOST>/assets/application-301651b1c7400a000974a9cecafd44ad3304cf647cf17bcfa7af68e9ed1ac4b7.js:9:21063
findByIds@https://<HOST>/assets/application-301651b1c7400a000974a9cecafd44ad3304cf647cf17bcfa7af68e9ed1ac4b7.js:9:21035
initialize/</<@https://<HOST>/theme-javascripts/ce296772003fb6162b99b62bf564066966940cc8.js?__ws=<HOST>:103:48
value/<@https://<HOST>/assets/application-301651b1c7400a000974a9cecafd44ad3304cf647cf17bcfa7af68e9ed1ac4b7.js:14:5447
C@https://<HOST>/assets/ember_jquery-7dfac344d893a6c10c016353b994db2c6f42af630322ea6da3399c220fcc50ed.js:6:19799
trigger@https://<HOST>/assets/ember_jquery-7dfac344d893a6c10c016353b994db2c6f42af630322ea6da3399c220fcc50ed.js:9:20668
s/</<@https://<HOST>/assets/application-301651b1c7400a000974a9cecafd44ad3304cf647cf17bcfa7af68e9ed1ac4b7.js:13:31963
y</t.invoke@https://<HOST>/assets/ember_jquery-7dfac344d893a6c10c016353b994db2c6f42af630322ea6da3399c220fcc50ed.js:16:9739
y</t.flush@https://<HOST>/assets/ember_jquery-7dfac344d893a6c10c016353b994db2c6f42af630322ea6da3399c220fcc50ed.js:16:8732
b</t.flush@https://<HOST>/assets/ember_jquery-7dfac344d893a6c10c016353b994db2c6f42af630322ea6da3399c220fcc50ed.js:16:10782
H</n._end@https://<HOST>/assets/ember_jquery-7dfac344d893a6c10c016353b994db2c6f42af630322ea6da3399c220fcc50ed.js:16:15440
H</n.end@https://<HOST>/assets/ember_jquery-7dfac344d893a6c10c016353b994db2c6f42af630322ea6da3399c220fcc50ed.js:16:12110
H</n._runExpiredTimers@https://<HOST>/assets/ember_jquery-7dfac344d893a6c10c016353b994db2c6f42af630322ea6da3399c220fcc50ed.js:16:16800

```

---

<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: [October 14, 2019, 8:04pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/6 "2019-10-14T20:04:37Z")

</div>

> [@fkohrt](#):
>
> I will just disable it, we weren’t using it anyways.

I have some thoughts on what might be causing it.

I’m curious, though – did you have any categories listed in the `kb categories` theme setting while it was enabled? I can see a case in the code where it may cause an issue if there are no categories selected.

EDIT: I’ve pushed a fix that I think might handle the issue.

[https://github.com/discourse/discourse-knowledge-base-theme/commit/c0f1be63a47d809685ae89d411dd8a8f10202fc4](https://github.com/discourse/discourse-knowledge-base-theme/commit/c0f1be63a47d809685ae89d411dd8a8f10202fc4)

---

<div class="post-metadata">

### Author: ![fkohrt](https://avatars.discourse-cdn.com/v4/letter/f/6de8d8/32.png) [@fkohrt](https://meta.discourse.org/u/fkohrt)
#### Post date: [October 14, 2019, 8:25pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/7 "2019-10-14T20:25:57Z")

</div>

> [@justin](#):
>
> did you have any categories listed in the `kb categories` theme setting while it was enabled?

Indeed, I had no categories listed. But the modal does not display even after choosing one.  
Maybe related, but maybe something totally different: The `default to kb view` setting has no effect while the category is being displayed, and I have to click on the `KB` button and the `Latest` button back and forth to enable the KB view.

**edit** : I updated the component and it behaves now as follows: With an empty category listing, the modal does show up 🎉. Once I choose a category, however, the modal does not show up anymore.

---

<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: [October 14, 2019, 8:35pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/8 "2019-10-14T20:35:28Z")

</div>

Are you seeing those same errors in logs?

What’s happening here is there’s a route getting triggered that’s trying to look for the knowledge base component before it’s loaded.

---

<div class="post-metadata">

### Author: ![fkohrt](https://avatars.discourse-cdn.com/v4/letter/f/6de8d8/32.png) [@fkohrt](https://meta.discourse.org/u/fkohrt)
#### Post date: [October 14, 2019, 8:40pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/9 "2019-10-14T20:40:35Z")

</div>

> [@justin](#):
>
> Are you seeing those same errors in logs?

Yeah, but they don’t stack anymore, but differ in the fourth line of their backtrace. The other lines look as above.

`initialize/</<@https://<HOST>/theme-javascripts/<VARIES>.js?__ws=<HOST>:103:48`

 ![Screenshot_2019-10-14%20Logs](https://global.discourse-cdn.com/meta/original/3X/9/1/916b92d6fe5848a9a7b97cb20407c34d871e9fef.png)

---

<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: [October 14, 2019, 8:48pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/10 "2019-10-14T20:48:43Z")

</div>

I added another commit with some additional checks to stop trying to query uninitialized items.

[https://github.com/discourse/discourse-knowledge-base-theme/commit/e0d7813e9f4b9c6031de6eb5a062ed4434a83069](https://github.com/discourse/discourse-knowledge-base-theme/commit/e0d7813e9f4b9c6031de6eb5a062ed4434a83069)

---

<div class="post-metadata">

### Author: ![fkohrt](https://avatars.discourse-cdn.com/v4/letter/f/6de8d8/32.png) [@fkohrt](https://meta.discourse.org/u/fkohrt)
#### Post date: [October 14, 2019, 8:51pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/11 "2019-10-14T20:51:35Z")

</div>

No difference, TypeErrors keep coming up.

---

<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: [October 14, 2019, 9:40pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/12 "2019-10-14T21:40:58Z")

</div>

I was able to fix those particular error messages in this commit. Not sure if it fixes the modal issue, but it seems related.

[https://github.com/discourse/discourse-knowledge-base-theme/commit/04ff864caf6823d37cb3cb1c153e0b7ed392fd3d](https://github.com/discourse/discourse-knowledge-base-theme/commit/04ff864caf6823d37cb3cb1c153e0b7ed392fd3d)

---

<div class="post-metadata">

### Author: ![fkohrt](https://avatars.discourse-cdn.com/v4/letter/f/6de8d8/32.png) [@fkohrt](https://meta.discourse.org/u/fkohrt)
#### Post date: [October 14, 2019, 9:43pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/13 "2019-10-14T21:43:22Z")

</div>

Looks good to me, the modal now shows up even with categories selected! 🎊

---

<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: [October 14, 2019, 9:45pm UTC](https://meta.discourse.org/t/registration-modal-popup-not-showing-up-for-private-instance/130959/14 "2019-10-14T21:45:42Z")

</div>


