Users piffy and Vaping_Community reported a bug where editing a topic containing a poll with results=on_close causes the page to hang and throws a console error, specifically Cannot read properties of undefined. The issue was reproducible in Discourse 3.4.0.beta1-dev with poll edit window mins set to 90, and persisted in safe mode. Initially suspected to be related to the poll’s name, further testing by piffy revealed the root cause was the results=on_close setting — polls with results=always worked fine. Vaping_Community initially couldn’t replicate but later confirmed the issue. merefield identified that the bug stems from the Results view being incorrectly rendered before poll closure, even for authors. The fix ensures the default view for on_close polls remains the voting view until closure. A PR was raised and merged to resolve the issue. Users are asked to confirm the fix resolves the problem.
Sadly, it seems I can’t replicate it on meta here. I did do a fresh update before testing on my instance, currently running 3.4.0.beta1-dev ( a3d61ba1c4)
Not sure if it matters but I have poll edit window mins set to 90 mins
I believe correctly, when the poll is set to “results ON_CLOSE”, vote numbers for each option are only streamed to the browser when the vote is Closed.
The issue is that when you refresh the page, the default view is results, which for this type of poll should NOT happen.
The Results view should not be possible to see until closure, even for the Author.
So the fix here is making sure the default view (for polls that have results on close) is the voting view until the Poll is Closed.