CSS not loading for login page

Hi all,

As of the most recent update, the login page doesn’t seem to load the CSS or what I think is JQuery.

Here is a screenshot of what the login page looks like. After logging in, everything functions correctly (the desk and all our enabled modules).

Does anyone know what went wrong?

Try: bench --site all clear-cache. We moved jquery and other js files to body section. If you have used $.ready in the content section of the web page, you need to change it to frappe.ready.

bench --site all clear-cache did not seem to help. Any other ideas?

@JamesE check the browser’s console for any javascript error or if css didn’t load

I can’t believe I didn’t think to check that beforehand. Here’s the error:

“The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.”

It seems to be because of the fact that it’s missing the html, head, style and body tags necessary to make the whole thing work. The file literally starts like this:

.page-sidebar, #wrap-footer, .page-header {
display: none;

.page-content {
right: 0%;
width: 100%;

#wrap {
background-color: #fafbfc;

Finally figured it out. We use an app for LDAP logins, which overwrites the login pages. A recent update broke it, so I hand-edited these 2 files to include the CSS files, doctype, head and body tags:


1 Like

@JamesE Hi, I’m facing the same issue. I’m not able to resolve it. Could you please show me a code snippet on what you added? Thanks.

Hi kirthi,

Here’s the ldap_login.html file: ldap_login.html - Pastebin.com

Here’s the login.html file: login.html - Pastebin.com

Does that help?

Thanks a lot @JamesE. This definitely helped. I made similar changes, but still the style was not laoded. This fixed it. Thanks again.


@JamesE I found the root cause. The login.html extends the web.html which contains all the tags needed. We shoujldnt be adding the tags manually. Adding the line " {% extends “templates/web.html” %} " at the top of the file is all that is needed.

1 Like