Theme components issue

AI-generated summary

Theme Components Issue Summary

The issue began with Genisis trying to add a theme selector to their Discourse instance, which failed to show up despite multiple attempts to troubleshoot. ondrej suggested using a specific theme component (TC), which Genisis had already tried with temporary success.

jenmck and Arkshine suggested checking theme compatibility and browser console errors, respectively. awesomerobot provided a step-by-step troubleshooting guide, including checking for updates, using the preview button, and inspecting the console for errors.

Ultimately, Genisis discovered the root cause: they had not added another theme to the site, mistakenly thinking color palettes were a separate theme. A later post from Genisis revealed they had not followed the correct steps after all.

I tried adding the theme selector to my instance but it doesn’t show up, I’ve updated, disabled it and re-added it, cleared cf cache, rebuilt instance. First one I added was dark mode switcher, worked for a few days then Idr what I did then it stopped working, I remember this being a thing some years ago but shocked it’s still happening.

Are you using this TC?

That’s correct, even tried this tc and it worked for a dew days and I think I disabled it to try the theme selector and it stopped working when I enabled it back

Have you tried using it with different themes? What theme are you using?

Can you check if the theme component is attached to your theme?

Also, do you see any error in the browser’s console?

A few things to check. First I’d make sure that Discourse and the theme component are up to date.

I would then try using the preview button at the bottom of the theme component’s setting page — this will show the theme component in isolation.

If the preview works, there’s likely a conflict with another theme. If it’s not working in preview I would check if you have Theme can be selected by users enabled on at least 2 themes, which is a requirement for the component to work.

If it’s still not working, maybe right click the page, select inspect, and check for any errors in the console.

Turns out it was me. I didn’t add another theme to the site, I assumed color pallets were “another theme of my default theme”, but still doesn’t explain why the dark mode switcher stopped working. Yes I did everything correctly.

Turns out I didn’t do this! I feel so stupid