"Akismet" plugin always returns "Sorry, an error has occured." although everything works as expected

Oh there is an Akismet report about a spam post:

Nope, not spam. I click “Not Spam”. But I get “Sorry, an error has occured.”:

But the report is gone:

And the log shows that the post was correctly “confirmed not spam”:

Anyone else having this problem?

2 Likes

This might happen when you click the button but the post was already handled by someone else.

Not sure how hard it is to properly handle this case though.

It was not, see my last screenshot. I am “Sujan12” that is logged as having handled it. That’s what makes this a bug :confused:

Some more investigating into this:


Chrome Dev Tools Network panel screenshot for another session. I go to /admin/plugins/akismet in the first request. Later you see allow which is /admin/plugins/akismet/allow that already responds with an error 500:

image

Again I checked the logs, it has my account as “confirmed not spam” for that post.

I’ve had this happen to me a couple of times as well. The first time I assumed it was a race condition, the next time I wasn’t so sure…

1 Like

This is another Rails 5 regression. Fixed here:

https://github.com/discourse/discourse-akismet/commit/137c30ec467bbdd98da29bd2b289acf50a639604

6 Likes

Great! For the record I saw this a few times in the last 10 days as well. Glad it’s fixed.

3 Likes

This topic was automatically closed after 26 hours. New replies are no longer allowed.