Poll results page produces error messages


#1

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

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?


(Régis Hanol) #3

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)


(Alan Tan) #4

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:


(Alan Tan) #5

@anon2041049 I just merged in

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


#6

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?


(Alan Tan) #7

The build is probably still building.


#8

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:


(Jeff Atwood) #9