# Colour Scheme - can't select light theme

**URL:** https://meta.discourse.org/t/colour-scheme-cant-select-light-theme/74971
**Category:** Bug
**Created:** [Novembre 28, 2017, 6:00 UTC](https://meta.discourse.org/t/colour-scheme-cant-select-light-theme/74971 "2017-11-28T18:00:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [Novembre 28, 2017, 6:00 UTC](https://meta.discourse.org/t/colour-scheme-cant-select-light-theme/74971/1 "2017-11-28T18:00:19Z")

</div>

With the new composer rolled into tests-passed I was just looking at colour schemes and found that selecting the light theme exhibits some strange behaviour:

# Customize \> Themes \> New

By default the scheme appears as:

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

If I select the dark theme it appears as:

 ![52](https://global.discourse-cdn.com/meta/original/3X/b/4/b4622cc23d4d00338f7e2f5f0a5bd3578a955611.png)

And if I select the light scheme again:

 ![26](https://global.discourse-cdn.com/meta/original/3X/a/8/a8148be7999c2022f2644058b51608a02d1e6b29.png)

Prior to rebuilding I was seeing a similar problem with Customize \> Colors, where I could create new schemes based on dark, but if I tried to clone the light scheme the +New button was active, but did nothing.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [Novembre 28, 2017, 8:19 UTC](https://meta.discourse.org/t/colour-scheme-cant-select-light-theme/74971/3 "2017-11-28T20:19:54Z")

</div>

To be clear it’s technically not a select-kit issue, the theme causing the issue has null as value, and I think we should fix it instead of adding one more special case in select-kit. I will look what could be the most appropriate solution.

---

<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: [Novembre 28, 2017, 9:33 UTC](https://meta.discourse.org/t/colour-scheme-cant-select-light-theme/74971/4 "2017-11-28T21:33:17Z")

</div>

Definitely, if this is an issue with a theme we ship, we should absolutely fix it!

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [Décembre 1, 2017, 5:29 UTC](https://meta.discourse.org/t/colour-scheme-cant-select-light-theme/74971/5 "2017-12-01T17:29:44Z")

</div>

> [@j.jaffeux](#):
>
> it’s technically not a select-kit issue, the theme causing the issue has null as value

Ok, as the light theme isn’t directly editable can that be fixed?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [Décembre 1, 2017, 5:37 UTC](https://meta.discourse.org/t/colour-scheme-cant-select-light-theme/74971/6 "2017-12-01T17:37:29Z")

</div>

let me see if I can push a quick fix

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [Décembre 1, 2017, 7:03 UTC](https://meta.discourse.org/t/colour-scheme-cant-select-light-theme/74971/7 "2017-12-01T19:03:39Z")

</div>

Should be fixed by:

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

I finally decided to fix it in select-kit directly, it was an issue to allow this at the beginning of select-kit, but it should work as long as we only have one item with `null` value in the content.

FWIW the null value comes from here: [discourse/lib/wizard/builder.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/lib/wizard/builder.rb#L151)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [Décembre 2, 2017, 4:00 UTC](https://meta.discourse.org/t/colour-scheme-cant-select-light-theme/74971/8 "2017-12-02T16:00:06Z")

</div>

This topic was automatically closed after 20 hours. New replies are no longer allowed.
