Several settings not matching docs and UI bugs

AI-generated summary

The discussion revolves around Several settings not matching docs and UI bugs in Discourse. ReenigneArcher initially reported several issues:

  • Missing settings: Voting, Discord webhook, and CSP options
  • UI bugs: Plugins menu not appearing, Discord chat integration issues, and a category creation button failing

Falco helped resolve some issues, suggesting that AdBlocker was causing problems with the plugins menu and Discord webhook option. Falco also explained that some settings are hidden in certain hosting tiers.

ReenigneArcher expressed interest in adding a WidgetBot crate (Discord integration) to the page but faced difficulties due to Content Security Policy (CSP) restrictions. Falco recommended creating a theme component to securely integrate the third-party JavaScript.

Despite efforts to extend the functionality via a theme component, ReenigneArcher encountered issues. ReenigneArcher also discovered that the Discourse Voting plugin was not included, which was clarified by Moin as not all official plugins are included in all hosting plans.

I am just getting started with Discourse, so perhaps I am missing something obvious although I don’t think so. I am using the hosted instance for open source projects, so don’t know if I have limited options or what is going on.

Missing settings

UI Bugs

  • Plugins menu does not appear except in Chrome Incognito mode. Firefox (including incognito mode) does not appear, like so.


    Chrome incognito mode below

    (Solved… AdBlocker)

  • Discord chat integration “Discord” button has no action, and have odd scrollbar below. No action taken or errors in developer mode when clicking button.

  • When creating a category, the “Add required tag group” button fails “until after the category has been saved”

Remove your adblock :rofl:

The webhooks thing is on the Discord UI, not on Discourse. Maybe they changed how it works?

Those settings are hidden in some of our hosting tiers.

Remove your adblock

Appears that helped with the plugins menu. Thanks!

The webhooks thing is on the Discord UI, not on Discourse. Maybe they changed how it works?

I know how to obtain the webhook from Discord (it hasn’t changed)… but I need to add the webhook address somewhere in Discourse so it can send to Discord.

Those settings are hidden in some of our hosting tiers.

That’s disappointing. I’d like to add a WidgetBot crate (discord integration) to the page… it’s a much better solution than (Deprecated) Display a "Discord Widget" in a dropdown button

<script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer>
  new Crate({
    server: '299881420891881473',
    channel: '355719584830980096',
  })
</script>

Pretty simple bit of code. Adding their source javascript manually doesn’t work.

I’m guessing there’s no alternative way to enable those options?

Perhaps there could be a request process to see if the source is safe and it could be added to hosted instances? Or just allow it since the javascript runs on the client and not the host anyway?

The correct way forward is creating a Customization > Theme component that does what you want there. A component like that can ship the third-party JS as a first-party asset, which is more secure and will be CSP compatible.

One recent example I’ve done is GitHub - discourse/discourse-orgchart · GitHub which ships 3 different JS libraries under it’s assets, and works just fine under CSP.

Okay, that points me in the right direction. I was confused about extending it via the settings.yml but it’s starting to make sense. This seems like a relevant example: discourse-mermaid-theme-component/settings.yml at fa43854e66becf43626063e33dde29f636933d1f · discourse/discourse-mermaid-theme-component · GitHub

BTW, I appreciate your responses!

If you want, an super easy way via the UI is just pasting the contents of https://cdn.jsdelivr.net/npm/@widgetbot/crate@3 in a script tag like:

<script>
// paste all of https://cdn.jsdelivr.net/npm/@widgetbot/crate@3"  contents here
</script>
<script>
  new Crate({
    server: '299881420891881473',
    channel: '355719584830980096',
  })
</script>

Unfortunately, that did not work.

Also, not working by extending it via a theme. :confused:

So, now that my plugins menu is working… it seems that the Discourse Voting is not included. Is this intentional? I imagined that official plugins would all be included by default.

Not all official plugins are included in all hosting plans