Certain verification pages do not respect the selected theme


(David 'Maisy' M.) #1

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.


(Jeff Atwood) #2

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


(Arpit Jalan) #3

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


(Sam Saffron) #4

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.


(Arpit Jalan) #5

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

Default Dark theme:

Discourse Vincent theme:


(Sam Saffron) #6

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)


(Arpit Jalan) #7

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


(David 'Maisy' M.) #8

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!


#9

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: