Polls disabled caused 500 error

AI-generated summary

A user reported a 500 error after updating Discourse, with logs showing a LocalJumpError related to the topic_view_post_custom_fields_whitelister method. The issue was traced to the disabled built-in “polls” plugin, which was causing the error. David identified the problem and provided a fix in the tests-passed branch. After updating, the user confirmed the issue was resolved. David explained that the error occurred because the disabled polls plugin was interfering with the code, and confirmed it was safe to keep it disabled after the fix. The user confirmed the plugin was disabled, resolving the mystery.

I just performed a update to the latest version of discourse (test-passed). After that update, I get an error message when accessing any topic in the forum. Something that translates to: Sorry, we couldn’t load the topic – probably due to a connection error. Please try again.

The production logs keeps showing

Completed 500 Internal Server Error in 439ms (ActiveRecord: 425.3ms)
LocalJumpError (unexpected return)
/var/www/discourse/lib/plugin/instance.rb:188:in `block (2 levels) in topic_view_post_custom_fields_whitelister'

for almost all requests.

Any help would be appreciated.

Rebuilding the app did not help.

What plugins do you have installed?

docker_manager
discourse-solved
discourse-cakeday

Do you have any other plugins installed, but disabled?

That was the list from app.yml. I don’t know any other place where plugins could be specified.

I have just created a fix, it will take a few minutes to reach tests-passed

https://github.com/discourse/discourse/commit/467c5299207636b2d9f966885c81d8b167283103

However, none of those three plugins make use of this particular part of the code, so I am unsure why the error is occurring for you.

@some-user it’s now in tests-passed, so please try updating again and see if that fixes the issue.

Thanks for the notification :slight_smile: Update is installed, problem solved. Amazingly quick support. :star_struck: Thank you very much!

If you want to look into that and I can do anything to support, let me know. But as the patient is alive again…

Good to hear :slight_smile:

I have one idea - do you have the built-in “polls” plugin disabled? (check the poll enabled site setting). That would explain it.

Yes, it is was. :relieved:

Mystery solved! :male_detective:

(now that the bug is fixed, it is perfectly safe to leave it disabled if you want)