Login form not showing [SITE DOWN]

(Tim) #1

Problem: Users are unable to log in because the login form is not displaying. The shadowbox does display though.

Cause: the discourse-modal div that contains the login form has the CSS class hidden. Not sure why the form isn’t being unhidden.

Workaround: Using Chrome’s developer tools, editing the DOM to remove the hidden class causes the login form to display correctly and can be used to authenticate. (This is not an acceptable workaround for users, obviously)

What changed: I honestly have no idea. The instance hasn’t been updated since Dec. 1. Not sure when the login issue actually started happening, but was just reported today.

Discourse details

Screenshot of missing login screen:

(Neil Lalonde) #2

Which plugins do you have installed? Have your css customizations changed recently? Do you add any custom javascript?

(Tim) #3

Which plugins do you have installed?

Have your css customizations changed recently?

There was a change for the deploy on 12/1, but I don’t think there have been any changes since then.

Do you add any custom javascript?

There is some, but it shouldn’t have changed any time recently.

Where can I look to see what that login button is (supposed to be) doing? I’m not sure where to continue with troubleshooting beyond finding that the div is hidden.

(Rafael dos Santos Silva) #4

Maybe a regression on subfolder?

Subfolder is working fine locally.

(Neil Lalonde) #5

The “purecloud-auth” seems obviously related to login/signup. Could it be busted?

(Tim) #6

That code hasn’t changed in 4+ months, but it’s possible a change in discourse caused a conflict.

Where can I look to see what the login button is (supposed to be) doing?

(Tim) #7

Did the login form change some time in the last month or so? Maybe that the login form isn’t added to the DOM until the log in button is clicked now and it was always there before?

(Tim) #8

I found a little gem in the login plugin:


This gets executed on page load, but discourse-modal doesn’t exist until after the login button is clicked. As far as I can tell, the plugin is not responsible for making the login form hidden initially.

How is discourse-modal supposed to be unhidden during a normal login process?

(Neil Lalonde) #9

The showLogin action should be called. But I don’t know why that’s necessary at all. If purecloud auth is the only way to log in (as an oauth provider or sso), then it should be shown automatically without custom javascript. Using jQuery to mess with stuff done with Ember is fragile.

(Tim) #10

Thanks for that link! I’ll take a look into that and see if I can make this less hack-ish. For the time being (to get the site working again), I’ve changed the code block to this:

  $(document).ready(function() {
    $('body').on('DOMNodeInserted', '#discourse-modal', function() {
      setTimeout(function(){$('#discourse-modal').removeClass('hidden');}, 800);