Header CSS not applied to User API access key confirm page

AI-generated summary

Header CSS not applied to User API access key confirm page

A bug has been identified where the header CSS is not applied on certain pages, such as the User API access key confirm page and 404 pages, in the Discourse app. sarahann reported the issue and provided reproduction steps. Cameron_D noted that it affects any page that doesn’t load the full Ember app. sam mentioned a similar issue was recently fixed, but this one appears to be related to custom CSS not being included on static, non-JS pages. Osama confirmed the issue and proposed a fix, which can be found in this GitHub pull request.

Hello!

I noticed something strange when adding some forums to the Discourse app.

Prerequisites:

  1. Have a mobile phone with the Discourse app installed

Devices:

  • iOS and android mobile phones. Likely any phone with the app installed. I used my Pixel XL.

Repro Steps:

  1. click the “+” icon to add a new forum to the app
  2. type “forums.gearsofwar.com” or “community.cartalk.com”
  3. click the “connect” button once the forum is in your list
  4. You may need to make an account with Xbox or CarTalk
  5. Once the account is created and you are on the authorize page notice the header scss is not applied

Results:

Expected Behavior:
The scss loads for the header.

  • The CarTalk Discourse header and the Gearsofwar Discourse header both show the app names instead of their icons. Which makes me thing the setting for the logo is not being accessed.
  • The custom header in gearsofwar doesn’t show up.
  • This doesn’t seem to affect footers?
2 Likes

I think this affects more than just the auth pages, any page that doesn’t load the full ember app, maybe? It also happens on the 404 page, for example. Example here on meta:

https://meta.discourse.org/thisisa404page (open in new tab)

1 Like

Yeah, I believe I have seen in on 404 pages as well

I recently merged a similar kind of issue at:

https://github.com/discourse/discourse/pull/5684

I guess we are not including custom css on static, non js pages

@Osama can you have a look at this and add to your list?

6 Likes

It looks like we do include custom CSS on non-JS pages for both mobile and desktop layouts, however this:

is indeed a bug and here is a fix for it:

https://github.com/discourse/discourse/pull/6050

5 Likes