Polls werken niet meer correct

AI-generated summary

Users reported that polls stopped functioning correctly after updating Discourse to commit 4efbf8dc4f, with no errors in logs but visible frontend issues. Don first reported the bug, noting that polls became non-interactive—checkboxes didn’t visually update, and vote results displayed duplicates. Mark_Schmucker observed that adding a title (though marked optional) temporarily restored functionality. simon reproduced the issue on try.discourse.org, confirming rendering delays and malformed markdown headers above polls. techAPJ traced the regression to a recent commit and noted cvx was investigating. A fix for the header rendering issue was merged (Nacho_Caballero), and cvx submitted and merged a second PR to restore interactivity for title-less polls. After the update, Don reported a new issue: poll settings became unresponsive. Quddus linked this to a broader dropdown selection bug. simon confirmed that updating to the latest Discourse code resolved all poll and dropdown issues on their local site. The core problem was a regression in poll rendering and interaction logic, now fully patched.

Hi there,

I just recently update my Discourse to the latest 4efbf8dc4f and polls stop working correctly.
No errors on log.
Thank you! :slight_smile:

The inspect console error

Test poll

  • Test option 1
  • Test option 2
  • Test option 3
0 voters
6 likes

Just ran into the same bug. I found it works with a title. The poll builder says “Title (optional)”, but it’s not optional.

  • A
  • B
  • C
0 voters
Title
  • A
  • B
  • C
0 voters
3 likes

I can reproduce the issue on our sandbox site: https://try.discourse.org/t/testing-issue-with-multiple-choice-type-polls/1411. I’m testing this with Chrome on Ubuntu.

There seem to be a couple of problems. The first thing I noticed was that with an untitled multiple select poll, checking the poll option did not cause the checkbox to display that it had been checked. When I clicked the “Vote now” button, my selections did get saved. After clicking the “Show vote” button, my votes are being displayed multiple times. There are currently about 24 entries for votes being displayed

Trying to create a multiple choice type poll with a title is working, but it is taking quite a long time for the poll to render on try.

Adding markdown header elements above the poll is causing a strange issue. The following markdown:

### A markdown heading above the poll

[poll type=regular results=always chartType=bar]
# A single choice poll with a title
* this
* is
* a
* test
[/poll]

is being rendered as:

5 likes

@techAPJ can you investigate?

3 likes

This seems like a recent regression in FEATURE: Add the title attribute to polls (#10759) · discourse/discourse@babbebf · GitHub … and looks like @cvx is already investigating per:

https://review.discourse.org/t/feature-add-the-title-attribute-to-polls-10759/15880/6?u=techapj

8 likes

It would be great if you could revert the commit in the meantime. :sweat_smile:

3 likes

This has now been fixed

https://github.com/discourse/discourse/commit/5c3f1202cf8f78e2c4063cf53551879cb32c9572

8 likes

Clarification - that’s a fix for the headings issue. :slightly_smiling_face:
I’m currently fixing the issue of non-interactive polls that don’t have a title (and similar bugs). I’ll update the topic when the PR is up!

8 likes

The second PR (review pending) is here: FIX: Correctly render title-less poll widgets by cvx · Pull Request #10837 · discourse/discourse · GitHub

update: merged

7 likes

Thank you so much the quick fix :folded_hands: Cannot wait to work it again :blush:

3 likes

Hi Jarek,

I updated and the main issue is fixed but now there is a new one.
The poll settings not respond, not changeable. Thank you! :slight_smile:

2 likes

It looks like this issue may be related to what I bumped into.

3 likes

Yes, I think that was the problem. Can you try updating your site to the latest Discourse code? I’ve just updated my local development site and all issues with polls and dropdowns are now resolved on my site.

7 likes