discord-tickets / bot

The most popular open-source and self-hosted ticket management bot for Discord - a free alternative to the premium and white-label plans of other popular ticketing bots.
https://discordtickets.app
GNU General Public License v3.0
880 stars 459 forks source link

[BUG] Opening message preview can break the category settings page #542

Open eartharoid opened 2 months ago

eartharoid commented 2 months ago

Is there an existing issue for this?

Current Behavior

When creating a new category, attempting to add a question after filling out the rest of the form will do nothing.

Expected Behavior

No response

Steps To Reproduce

  1. In server settings, go to Categories and click Create
  2. Open Dev Tools to the side and click on the Console tab
  3. Type in the opening message box, then select a ping role
  4. Notice an error appears in the console
  5. Click the Add question button and see that nothing happens
  6. Refresh the page and try again, but select a ping role first and then enter the opening message, note that it works.

Environment

- OS:
- Node:
- NPM:
- Bot: 4.0.18

Anything else?

Thanks to @kingjodev for help finding the cause:

https://github.com/discord-tickets/portal/blob/67e90ce3c496406da4da1fca488187478f112e83/src/routes/settings/%5Bguild%5D/categories/%5Bcategory%5D/%2Bpage.svelte#L374-L387