Certain verification pages do not respect the selected theme

As part of our brand, we are heavily redesigning a development install of Discourse ready for when we migrate over our existing forums.

During development and testing, I have picked up on a few cases where the forum temporarily reverts to the default (white) theme.

Steps to Reproduce
Whilst the Default theme has been disabled and a custom theme has been set…

  • Sign up
  • Await confirmation email - click link in email
  • Navigate to /u/activate-account/
  • “Click here to activate your acccount”

After clicking to activate your account, the subsequent “you have activated your account” page displays the default white theme until you click through or are re-directed to the forum index.

A similar behavior is also exhibited when I go to assign a new administrator and click on the verification link that is sent via email - on completion, a white page is shown, as below:

The latter isn’t a huge issue, as Administrators will be the only people to see this page, but it probably shouldn’t be happening when regular users go to verify their accounts.

Hopefully I’m just being silly and I’ve missed some small detail, but just in case I’m not being silly, I figured I would raise it here.

6 Likes

Sure, agreed, for the user-facing one, we should look at that @techAPJ.

3 Likes

I think this is not a trivial change as those pages are not using the Ember layout. Will discuss with Sam regarding this.

3 Likes

I don’t think this is too hard, we can add theme css to the static pages. It will not run any JavaScript though that the theme sets up.

4 Likes

Themes are already working on static pages (with no_layout). Example:

Default Dark theme:

Discourse Vincent theme:

4 Likes

Maybe this is an edge case with per user theme? I doubt it, but worth double checking. (keep in mind the OP here is already logged on)

4 Likes

Works as expected when logged in with dark theme enabled in my preferences (default for everyone else) and accessing static page (/users/activate-account/xyz).

3 Likes

I can confirm on our dev site that the styling is now being correctly applied when doing things such as promoting administrators etc.

Nice stuff!

3 Likes

I did find one minor area that still has an issue. Try enabling the dark theme here on Meta and going to a page not found url like so:

https://meta.discourse.org/junkurl

The logo doesn’t seem to respect the styling:

2 Likes

I see the email verification page is using the dark theme as set, but after clicking activate account we are directed to another light page for a few seconds:
image
Before being redirected back to the home page (dark). Can we do anything about this interim light page?

2 Likes