# 某些验证页面未遵循所选主题

**URL:** https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686
**Category:** UX
**Created:** [2018年五月3日 16:30 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686 "2018-05-03T16:30:26Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Maisy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maisy/32/119902_2.png) [@Maisy](https://meta.discourse.org/u/Maisy)
#### Post date: [2018年五月3日 16:30 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/1 "2018-05-03T16:30:26Z")

</div>

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:

 ![08](https://global.discourse-cdn.com/meta/original/3X/4/9/490c20e39b367bde5ae302b529607a250264cabb.png)

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2018年五月3日 21:43 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/2 "2018-05-03T21:43:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2018年五月10日 15:17 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/3 "2018-05-10T15:17:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2018年五月10日 22:07 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/4 "2018-05-10T22:07:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2018年五月15日 10:11 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/5 "2018-05-15T10:11:37Z")

</div>

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

Default Dark theme:

 ![45](https://global.discourse-cdn.com/meta/original/3X/d/5/d5a6f1f6cf2b546692e268478434e50b7ffcc4d5.png)

[Discourse Vincent theme](https://meta.discourse.org/t/discourse-vincent-theme/76662):

 ![00](https://global.discourse-cdn.com/meta/original/3X/d/1/d1d0a2b1cbe8076afe5f9a9d109db5c6a324c571.jpg)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2018年五月16日 01:05 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/6 "2018-05-16T01:05:30Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2018年五月25日 08:14 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/7 "2018-05-25T08:14:47Z")

</div>

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

 ![50](https://global.discourse-cdn.com/meta/original/3X/e/a/ea2f247b82a2469870a0ccc1b0c73f549044f17a.png)

---

<div class="post-metadata">

### Author: ![Maisy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maisy/32/119902_2.png) [@Maisy](https://meta.discourse.org/u/Maisy)
#### Post date: [2018年五月25日 08:56 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/8 "2018-05-25T08:56:16Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [2018年五月25日 09:26 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/9 "2018-05-25T09:26:43Z")

</div>

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](https://meta.discourse.org/junkurl)

The logo doesn’t seem to respect the styling:

 ![08%20AM](https://global.discourse-cdn.com/meta/original/3X/7/6/76e9a64722768d23479bd6d03c36322157a4dfc2.png)

---

<div class="post-metadata">

### Author: ![ian1](https://avatars.discourse-cdn.com/v4/letter/i/ebca7d/32.png) [@ian1](https://meta.discourse.org/u/ian1)
#### Post date: [2019年八月5日 04:09 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/10 "2019-08-05T04:09:57Z")

</div>

我看到邮箱验证页面已应用了设置的深色主题，但在点击“激活账户”后，我们会被短暂地重定向到一个浅色页面：

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/c/0c80941914ffee6cde9cb39079d86899421eb62b.png)  
随后才会被重定向回深色主题的主页。我们能否解决这个中间出现的浅色页面问题？

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [2020年十一月12日 19:13 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/11 "2020-11-12T19:13:22Z")

</div>

_我_认为该主题中的所有问题目前都已得到解决。我测试了常规注册流程和基于审批的注册流程，所有页面似乎都遵循了当前主题。我还刚刚提交了一个解决方案，用于修复静态页面上 logo 不一致的问题：

> <https://github.com/discourse/discourse/commit/e1fbd56f6f2a38cb348eee1b38b6efa0ae9f1f37>
>
> Now that we have dark logo settings in core, we can relatively easily ensure tha…t static pages (such as the 404 page) use a logo that is appropriate for the given light or dark color scheme.

我现在将暂时关闭此主题。如果出现任何新问题，请新建一个主题！

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [2020年十一月12日 19:14 UTC](https://meta.discourse.org/t/certain-verification-pages-do-not-respect-the-selected-theme/86686/12 "2020-11-12T19:14:21Z")

</div>


