Polls stop working correctly

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
5 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: Testing issue with multiple choice type polls - Demo. 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 https://github.com/discourse/discourse/commit/babbebfb3571b09bfe6600bbe0921ded3c29fb3e#diff-170edb1ef99339086c2d8d1c2b264e90 … and looks like @cvx is already investigating per:

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: https://github.com/discourse/discourse/pull/10837

update: merged

7 Likes

Thank you so much the quick fix :pray: 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