The discussion revolves around an internal server error when creating topics and posts with polls. Ellibereth experiences this issue on their instance, but not on try.discourse with only official plugins.
After checking the logs, Ellibereth finds an error related to a unique constraint on the polls table. Simon explains that polls are part of the Poll plugin, which comes bundled with Discourse, and provides instructions on how to enter safe-mode while keeping the Poll plugin enabled.
However, Ellibereth still experiences the issue in safe mode with only official plugins. Simon suggests that the problem might be due to a post with two polls having the same name, and provides a way to investigate this using the rails console.
Ultimately, Ellibereth discovers that the issue is caused by one of their custom plugins, which is affecting the site even in safe mode. codinghorror explains that server-side changes in plugins cannot be disabled via safe mode.
I’m getting an internal server error when making topics and posts with polls in them on my instance. The topic/post still gets created but the composer content doesn’t get cleared.
On testing it doesn’t seem to be happening here - I tried on safe mode with only official plugins on in my instance and it’s still happening though.
Which plugin is in charge of creating polls - not seeing one in the list? When I go to safe mode with everything off the poll option disappears all together.
EDIT: Also seems to be working properly on try.discourse with only official plugins available. What reasons would there be for the safe mode behavior there and on my instance to be different?
Just realized that polls are part of core and not a plugin. Doesn’t that mean that the poll option should appear in safe-mode with everything off, or am I misunderstanding how safe mode works?
To enter safe-mode, but keep the poll plugin enabled, deselect ‘Disable all plugins’ and make sure that ‘Disable unofficial plugins’ is selected when you enter safe-mode.
Mmm I tried that. If the error is happening in safe mode with only official plugins does it imply that it has to be one of the official plugins I have causing the error? I’m mainly struggling because I get the error in safe mode with only official plugins on my instance but not on try.discourse.
From looking at the error message you have posted, it seems that the problem is with the post on your site with the id 74475. There are probably two polls in the post with the same name.
You could try finding that post by entering your rails console and then run:
Post.find(74475)
See if there are two polls in the post’s raw field that have the same name.