# User-defined theme switcher disappears on admin pages

**URL:** https://meta.discourse.org/t/user-defined-theme-switcher-disappears-on-admin-pages/98230
**Category:** Bug
**Created:** [September 27, 2018, 5:42pm UTC](https://meta.discourse.org/t/user-defined-theme-switcher-disappears-on-admin-pages/98230 "2018-09-27T17:42:39Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![robmc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robmc/32/125900_2.png) [@robmc](https://meta.discourse.org/u/robmc)
#### Post date: [September 27, 2018, 5:42pm UTC](https://meta.discourse.org/t/user-defined-theme-switcher-disappears-on-admin-pages/98230/1 "2018-09-27T17:42:39Z")

</div>

The user-defined option selector disappears from the hamburger menu if you switch while you are in Admin pages - and stays missing if you navigate back to the main site - until you hard refresh.

BEFORE

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/6/76357e896a338cd1aebe2646921081579030fe8c.jpeg)

AFTER

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/1/b160ba3ee4ad6f8ed7d9dc6b61c6a29ba54501c5.jpeg)

**repro steps** :

- Navigate to dashboard, then click the hamburger menu so can see the theme options.
- Select a different theme
- When this loads, the options to switch again are missing on the menu

This does not happen outside of admin area

---

<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: [September 27, 2018, 5:49pm UTC](https://meta.discourse.org/t/user-defined-theme-switcher-disappears-on-admin-pages/98230/2 "2018-09-27T17:49:57Z")

</div>

Isn’t this in fact expected since admin areas are intentionally not themed, e.g. we don’t allow admin to be broken by theming as it becomes impossible to fix it because you need the admin UI to work in order to change anything about theming in the first place?

Also, isn’t the trivial workaround to.. simply avoid switching themes in the admin area?

---

<div class="post-metadata">

### Author: ![robmc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robmc/32/125900_2.png) [@robmc](https://meta.discourse.org/u/robmc)
#### Post date: [September 27, 2018, 6:12pm UTC](https://meta.discourse.org/t/user-defined-theme-switcher-disappears-on-admin-pages/98230/3 "2018-09-27T18:12:33Z")

</div>

> [@codinghorror](#):
>
> Isn’t this in fact expected since admin areas are intentionally not themed

Possibly, but if that is the case, then the option to switch themes should disappear when you navigate to `admin`, but it doesn’t so I am able to switch themes here. It is only after doing it that it disappears, so it looked to be an omission rather than a safety issue.

> [@codinghorror](#):
>
> Also, isn’t the trivial workaround to… simply avoid switching themes in the admin area?

yes, and this may be an edge case. I was testing a possible issue with column headers not appearing (or rather being white on white) so wanting to see if the reported issue was theme-related - i.e. some OTHER setting was breaking the admin interface when it should not. So there will be some possible occasions where you might want or need to, but one _could_ keep switching out of admin to do this, but since the option appears here, others may experience the same

---

<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: [September 27, 2018, 6:14pm UTC](https://meta.discourse.org/t/user-defined-theme-switcher-disappears-on-admin-pages/98230/4 "2018-09-27T18:14:54Z")

</div>

This is also a component, not a part of core Discourse at all. To be honest, I’m not even a fan of this optional add-on feature _here_. It clutters the menu.

---

<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: [September 27, 2018, 11:45pm UTC](https://meta.discourse.org/t/user-defined-theme-switcher-disappears-on-admin-pages/98230/5 "2018-09-27T23:45:38Z")

</div>

This is totally unrelated to this specific component, happens on any component that amends the hamburger menu, eg:

> [@Custom Hamburger Menu Links](https://meta.discourse.org/t/custom-hamburger-menu-links/87644):
>
> discourse2Summary Custom Hamburger Menu Links will allow you to easily add links to the hamburger menu.eyeglassesPreview [Preview on theme-creator.discourse.org](https://theme-creator.discourse.org/theme/awesomerobot/hamburger-links)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-custom-hamburger-links](https://github.com/discourse/discourse-custom-hamburger-links)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Samples Desktop Mobile Settings You add links via comma delimited values in…

Must be leftover from “auto disable customization in admin on reload”, that we created prior to [safe mode](https://meta.discourse.org/t/53504?silent=true)

---

<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: [October 15, 2018, 6:31am UTC](https://meta.discourse.org/t/user-defined-theme-switcher-disappears-on-admin-pages/98230/7 "2018-10-15T06:31:03Z")

</div>

Good catch @robmc , we had some archeological code that is no longer needed and no longer makes sense:

[https://github.com/discourse/discourse/commit/4c8fe13500c5b79bb93366fdfb4003e82f585220](https://github.com/discourse/discourse/commit/4c8fe13500c5b79bb93366fdfb4003e82f585220)

This is now fixed.

---

<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: [October 15, 2018, 6:31am UTC](https://meta.discourse.org/t/user-defined-theme-switcher-disappears-on-admin-pages/98230/8 "2018-10-15T06:31:07Z")

</div>


