Registration modal/popup not showing up for private instance


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 :confused:

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

Do you have any theme components installed on the site? Does the issue persist in safe mode?


Fantastic, you were right! Removing the Knowledge Base 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!

1 Like

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

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

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):

1 Like

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.


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 :tada:. Once I choose a category, however, the modal does not show up anymore.

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.

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


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

No difference, TypeErrors keep coming up.

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

1 Like

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