Poll results page produces error messages

Version: v1.8.0.beta2 +90 (very recent)

When browsing to a poll and switching to the results page I got an error message, which re-appeared several times when clicking “ok”

This error occurs for logged-in and non-logged-in users

I can send the production log snippet to anyone that’s interested. Can’t see anything obviously wrong in it.

The client-side javascript log shows the following:

2 Likes

Looks like HTTP 429 indicates a rate limit issue.

My poll has 67 responders, 261 votes.

Think perhaps the standard Discourse rate limits need upping?

Looks like we’re doing 1 request per option in order to retrieve the voters. This triggers the rate limiter when viewing the results of your poll (cc @tgxworld)

5 Likes

Ah yes… this was something that I was struggling to fix previously.

The migration to widgets made it easier :slight_smile:

I have a fix going but I just need some more time to verify that I didn’t break anything :wink:

https://github.com/discourse/discourse/pull/4676

6 Likes

@ChrisBeach I just merged in

https://github.com/discourse/discourse/commit/8bd8f07ce019265f4c510b9de8631dfa749b5dc2

Can you test it out? Thank you! I added more tests as well so the plugin should be alot more stable.

5 Likes

Hi @tgxworld. Thanks for making this fix. My forum is on the tests-passed branch and I can’t see your fix in the change list linked from ‘admin/upgrade’. Does it need to be merged in?

1 Like

The build is probably still building.

1 Like

I have just got the fix and tested it with the large poll I mentioned in my OP. No errors, now, and the performance is also improved.

Thank you very much for fixing this, and importantly - adding automated tests.

It’s the presence of tests that makes me comfortable using the latest beta of Discourse for my live forum.

Great work as always @tgxworld :thumbsup:

7 Likes