Broken on tests-passed

When multilingual is installed on tests-passed as of this morning, the forum throws a 500 error.

[db2584] Completed 500 Internal Server Error in 36ms (ActiveRecord: 0.0ms | Allocations: 14065)
[db2584] ActionView::Template::Error (undefined local variable or method `response' for #<Multilingual::LocaleLoader:0x00007f5c9171ef68 @ctx=#<ListController:0x0000000009d8f0>>)
app/helpers/application_helper.rb:69:in `csp_nonce_placeholder'
app/helpers/application_helper.rb:153:in `preload_script_url'
app/helpers/application_helper.rb:145:in `block in preload_script'
app/helpers/application_helper.rb:143:in `map'
app/helpers/application_helper.rb:143:in `preload_script'
lib/plugin/instance.rb:651:in `block in register_html_builder'
lib/discourse_plugin_registry.rb:211:in `block in build_html'
lib/discourse_plugin_registry.rb:211:in `map'
lib/discourse_plugin_registry.rb:211:in `build_html'
app/helpers/application_helper.rb:571:in `build_plugin_html'
lib/topic_list_responder.rb:15:in `block (2 levels) in respond_with_list'
lib/topic_list_responder.rb:8:in `respond_with_list'
app/controllers/list_controller.rb:111:in `block (2 levels) in <class:ListController>'
app/controllers/application_controller.rb:423:in `block in with_resolved_locale'
app/controllers/application_controller.rb:423:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:64:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:391:in `call'
lib/middleware/csp_script_nonce_injector.rb:12:in `call'
config/initializers/008-rack-cors.rb:26:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/request_tracker.rb:236:in `call'

I suspect this is the change in core DEV: Memoize CSP nonce placeholder on response (#25724) · discourse/discourse@1672a24 · GitHub in combination with the fact that LocaleLoader does not have a response method - although I’m not sure I completely understand what is going on. @angus?

Sorry, I don’t have the space for this at the moment.

Just to be clear, not asking you to fix it, only asking for a bit of guidance in determining where the problem is.

There’s an open PR, not sure if that’s related?:

@jumagura were you going to have a look at this PR?

1 Like

Yes, that’s definitely related (and FWIW looks good to me)


I will look into it now

EDIT: This is merged now