Events broken

Events broken
0

Environment

Discourse Version: 2.4.0.beta10 (3a906ff0e6)

Plugin Commit: 63e7a38

Other Plugins
Installed Plugins
Name Version Enabled?
discourse-assign 0.1 Y
discourse-calendar 0.2 N
discourse-canned-replies 1.2 Y
discourse-checklist 0.4.1 Y
discourse-code-review 0.1 N
discourse-data-explorer 0.2 N
discourse-encrypt 0.1 Y
discourse-events 0.1 Y
discourse-footnote 0.1 Y
discourse-github 0.3 Y
discourse-graphviz 0.0.1 N
discourse-locations 0.1 Y
discourse-math 0.9 N
discourse-policy 0.1 Y
discourse-push-notifications 0.3.0 N
discourse-saml 0.1 Y
discourse-saved-searches 0.1 N
discourse-solved 0.1 Y
discourse-spoiler-alert 0.4 Y
discourse-voting 0.4 Y
discourse-whos-online 1.0 Y
discourse-yearly-review 0.1 N
docker_manager

Steps to Reproduce

  1. Activate events in a category
  2. The category fails to load with errors:

Value ‘’ for custom field ‘event_going’ is not json, it is being ignored.
3:23 pm
NoMethodError (undefined method join' for {}:Hash) /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.1/lib/active_record/relation/finder_methods.rb:342:in raise_record_not_found_exce

Example

https://talk.incommon.cc/c/welcome/9

We removed the plugin so we can use the category in the meantime, so it should not show the bug anymore… Not really live then, is it.

Logs

Error:
Value ‘’ for custom field ‘event_going’ is not json, it is being ignored.

Backtrace:
/var/www/discourse/app/models/concerns/has_custom_fields.rb:58:in rescue in parse_json_value' /var/www/discourse/app/models/concerns/has_custom_fields.rb:55:in parse_json_value’
/var/www/discourse/app/models/concerns/has_custom_fields.rb:47:in cast_custom_field' /var/www/discourse/app/models/concerns/has_custom_fields.rb:13:in append_field’
/var/www/discourse/app/models/concerns/has_custom_fields.rb:133:in block in preload_custom_fields' /var/www/discourse/app/models/concerns/has_custom_fields.rb:125:in each’
/var/www/discourse/app/models/concerns/has_custom_fields.rb:125:in preload_custom_fields' /var/www/discourse/app/models/topic_list.rb:134:in load_topics’
/var/www/discourse/app/models/topic_list.rb:78:in topics' /var/www/discourse/app/serializers/topic_list_serializer.rb:33:in include_more_topics_url?’
active_model_serializers-0.8.4/lib/active_model/serializer.rb:375:in include?' (eval):4:in _fast_attributes’
active_model_serializers-0.8.4/lib/active_model/serializer.rb:456:in attributes' active_model_serializers-0.8.4/lib/active_model/serializer.rb:480:in _serializable_hash’
active_model_serializers-0.8.4/lib/active_model/serializer.rb:359:in serializable_hash' active_model_serializers-0.8.4/lib/active_model/serializer.rb:343:in as_json’
/var/www/discourse/app/controllers/application_controller.rb:429:in serialize_data' /var/www/discourse/app/controllers/application_controller.rb:438:in render_serialized’
/var/www/discourse/lib/topic_list_responder.rb:20:in block (2 levels) in respond_with_list' actionpack-6.0.1/lib/action_controller/metal/mime_responds.rb:214:in respond_to’
/var/www/discourse/lib/topic_list_responder.rb:13:in respond_with_list' /var/www/discourse/app/controllers/list_controller.rb:100:in block (2 levels) in class:ListController
/var/www/discourse/app/controllers/list_controller.rb:105:in public_send' /var/www/discourse/app/controllers/list_controller.rb:105:in block (2 levels) in class:ListController
actionpack-6.0.1/lib/action_controller/metal/basic_implicit_render.rb:6:in send_action' actionpack-6.0.1/lib/abstract_controller/base.rb:196:in process_action’
actionpack-6.0.1/lib/action_controller/metal/rendering.rb:30:in process_action' actionpack-6.0.1/lib/abstract_controller/callbacks.rb:42:in block in process_action’
activesupport-6.0.1/lib/active_support/callbacks.rb:135:in run_callbacks' actionpack-6.0.1/lib/abstract_controller/callbacks.rb:41:in process_action’
actionpack-6.0.1/lib/action_controller/metal/rescue.rb:22:in process_action' actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:33:in block in process_action’
activesupport-6.0.1/lib/active_support/notifications.rb:180:in block in instrument' activesupport-6.0.1/lib/active_support/notifications/instrumenter.rb:24:in instrument’
activesupport-6.0.1/lib/active_support/notifications.rb:180:in instrument' actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:32:in process_action’
actionpack-6.0.1/lib/action_controller/metal/params_wrapper.rb:245:in process_action' activerecord-6.0.1/lib/active_record/railties/controller_runtime.rb:27:in process_action’
actionpack-6.0.1/lib/abstract_controller/base.rb:136:in process' actionview-6.0.1/lib/action_view/rendering.rb:39:in process’
rack-mini-profiler-1.1.6/lib/mini_profiler/profiling_methods.rb:104:in block in profile_method' actionpack-6.0.1/lib/action_controller/metal.rb:191:in dispatch’
actionpack-6.0.1/lib/action_controller/metal.rb:252:in dispatch' actionpack-6.0.1/lib/action_dispatch/routing/route_set.rb:51:in dispatch’
actionpack-6.0.1/lib/action_dispatch/routing/route_set.rb:33:in serve' actionpack-6.0.1/lib/action_dispatch/journey/router.rb:49:in block in serve’
actionpack-6.0.1/lib/action_dispatch/journey/router.rb:32:in each' actionpack-6.0.1/lib/action_dispatch/journey/router.rb:32:in serve’
actionpack-6.0.1/lib/action_dispatch/routing/route_set.rb:837:in call' /var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:68:in call’
rack-2.0.8/lib/rack/tempfile_reaper.rb:15:in call' rack-2.0.8/lib/rack/conditional_get.rb:25:in call’
rack-2.0.8/lib/rack/head.rb:12:in call' /var/www/discourse/lib/content_security_policy/middleware.rb:12:in call’
/var/www/discourse/lib/middleware/anonymous_cache.rb:318:in call' rack-2.0.8/lib/rack/session/abstract/id.rb:259:in context’
rack-2.0.8/lib/rack/session/abstract/id.rb:253:in call' actionpack-6.0.1/lib/action_dispatch/middleware/cookies.rb:648:in call’
actionpack-6.0.1/lib/action_dispatch/middleware/callbacks.rb:27:in block in call' activesupport-6.0.1/lib/active_support/callbacks.rb:101:in run_callbacks’
actionpack-6.0.1/lib/action_dispatch/middleware/callbacks.rb:26:in call' actionpack-6.0.1/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in call’
actionpack-6.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:32:in call' actionpack-6.0.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in call’
logster-2.6.2/lib/logster/middleware/reporter.rb:43:in call' railties-6.0.1/lib/rails/rack/logger.rb:38:in call_app’
railties-6.0.1/lib/rails/rack/logger.rb:28:in call' /var/www/discourse/config/initializers/100-quiet_logger.rb:18:in call’
/var/www/discourse/config/initializers/100-silence_logger.rb:31:in call' actionpack-6.0.1/lib/action_dispatch/middleware/remote_ip.rb:81:in call’
actionpack-6.0.1/lib/action_dispatch/middleware/request_id.rb:27:in call' /var/www/discourse/lib/middleware/enforce_hostname.rb:17:in call’
rack-2.0.8/lib/rack/method_override.rb:22:in call' rails_multisite-2.0.7/lib/rails_multisite/middleware.rb:24:in call’
rack-2.0.8/lib/rack/sendfile.rb:111:in call' actionpack-6.0.1/lib/action_dispatch/middleware/host_authorization.rb:77:in call’
rack-mini-profiler-1.1.6/lib/mini_profiler/profiler.rb:296:in call' message_bus-2.2.3/lib/message_bus/rack/middleware.rb:57:in call’
/var/www/discourse/lib/middleware/request_tracker.rb:181:in call' railties-6.0.1/lib/rails/engine.rb:526:in call’
railties-6.0.1/lib/rails/railtie.rb:190:in public_send' railties-6.0.1/lib/rails/railtie.rb:190:in method_missing’
rack-2.0.8/lib/rack/urlmap.rb:68:in block in call' rack-2.0.8/lib/rack/urlmap.rb:53:in each’
rack-2.0.8/lib/rack/urlmap.rb:53:in call' unicorn-5.5.3/lib/unicorn/http_server.rb:605:in process_client’
unicorn-5.5.3/lib/unicorn/http_server.rb:700:in worker_loop' unicorn-5.5.3/lib/unicorn/http_server.rb:548:in spawn_missing_workers’
unicorn-5.5.3/lib/unicorn/http_server.rb:144:in start' unicorn-5.5.3/bin/unicorn:128:in <top (required)>’
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in load' /var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in

Error:
NoMethodError (undefined method join' for {}:Hash) /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.1/lib/active_record/relation/finder_methods.rb:342:in raise_record_not_found_exception!’

Backtrace:

activerecord-6.0.1/lib/active_record/relation/finder_methods.rb:342:in raise_record_not_found_exception!' activerecord-6.0.1/lib/active_record/relation/finder_methods.rb:452:in find_one’
activerecord-6.0.1/lib/active_record/relation/finder_methods.rb:434:in find_with_ids' activerecord-6.0.1/lib/active_record/relation/finder_methods.rb:69:in find’
activerecord-6.0.1/lib/active_record/querying.rb:21:in find' activerecord-6.0.1/lib/active_record/core.rb:167:in find’
/var/www/discourse/plugins/discourse-events/plugin.rb:193:in event' /var/www/discourse/plugins/discourse-events/plugin.rb:243:in event’
(eval):47:in _fast_attributes' active_model_serializers-0.8.4/lib/active_model/serializer.rb:468:in rescue in attributes’
active_model_serializers-0.8.4/lib/active_model/serializer.rb:455:in attributes' active_model_serializers-0.8.4/lib/active_model/serializer.rb:480:in _serializable_hash’
active_model_serializers-0.8.4/lib/active_model/serializer.rb:359:in serializable_hash' active_model_serializers-0.8.4/lib/active_model/serializer/associations.rb:124:in block in serialize’
active_model_serializers-0.8.4/lib/active_model/serializer/associations.rb:123:in map' active_model_serializers-0.8.4/lib/active_model/serializer/associations.rb:123:in serialize’
/var/www/discourse/lib/freedom_patches/ams_include_without_root.rb:57:in include!' active_model_serializers-0.8.4/lib/active_model/serializer.rb:368:in block in include_associations!’
active_model_serializers-0.8.4/lib/active_model/serializer.rb:367:in each_key' active_model_serializers-0.8.4/lib/active_model/serializer.rb:367:in include_associations!’
active_model_serializers-0.8.4/lib/active_model/serializer.rb:362:in serializable_hash' active_model_serializers-0.8.4/lib/active_model/serializer.rb:343:in as_json’
/var/www/discourse/app/controllers/application_controller.rb:429:in serialize_data' /var/www/discourse/app/controllers/application_controller.rb:438:in render_serialized’
/var/www/discourse/lib/topic_list_responder.rb:20:in block (2 levels) in respond_with_list' actionpack-6.0.1/lib/action_controller/metal/mime_responds.rb:214:in respond_to’
/var/www/discourse/lib/topic_list_responder.rb:13:in respond_with_list' /var/www/discourse/app/controllers/list_controller.rb:100:in block (2 levels) in class:ListController
/var/www/discourse/app/controllers/list_controller.rb:105:in public_send' /var/www/discourse/app/controllers/list_controller.rb:105:in block (2 levels) in class:ListController
actionpack-6.0.1/lib/action_controller/metal/basic_implicit_render.rb:6:in send_action' actionpack-6.0.1/lib/abstract_controller/base.rb:196:in process_action’
actionpack-6.0.1/lib/action_controller/metal/rendering.rb:30:in process_action' actionpack-6.0.1/lib/abstract_controller/callbacks.rb:42:in block in process_action’
activesupport-6.0.1/lib/active_support/callbacks.rb:135:in run_callbacks' actionpack-6.0.1/lib/abstract_controller/callbacks.rb:41:in process_action’
actionpack-6.0.1/lib/action_controller/metal/rescue.rb:22:in process_action' actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:33:in block in process_action’
activesupport-6.0.1/lib/active_support/notifications.rb:180:in block in instrument' activesupport-6.0.1/lib/active_support/notifications/instrumenter.rb:24:in instrument’
activesupport-6.0.1/lib/active_support/notifications.rb:180:in instrument' actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:32:in process_action’
actionpack-6.0.1/lib/action_controller/metal/params_wrapper.rb:245:in process_action' activerecord-6.0.1/lib/active_record/railties/controller_runtime.rb:27:in process_action’
actionpack-6.0.1/lib/abstract_controller/base.rb:136:in process' actionview-6.0.1/lib/action_view/rendering.rb:39:in process’
rack-mini-profiler-1.1.6/lib/mini_profiler/profiling_methods.rb:104:in block in profile_method' actionpack-6.0.1/lib/action_controller/metal.rb:191:in dispatch’
actionpack-6.0.1/lib/action_controller/metal.rb:252:in dispatch' actionpack-6.0.1/lib/action_dispatch/routing/route_set.rb:51:in dispatch’
actionpack-6.0.1/lib/action_dispatch/routing/route_set.rb:33:in serve' actionpack-6.0.1/lib/action_dispatch/journey/router.rb:49:in block in serve’
actionpack-6.0.1/lib/action_dispatch/journey/router.rb:32:in each' actionpack-6.0.1/lib/action_dispatch/journey/router.rb:32:in serve’
actionpack-6.0.1/lib/action_dispatch/routing/route_set.rb:837:in call' /var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:68:in call’
rack-2.0.8/lib/rack/tempfile_reaper.rb:15:in call' rack-2.0.8/lib/rack/conditional_get.rb:25:in call’
rack-2.0.8/lib/rack/head.rb:12:in call' /var/www/discourse/lib/content_security_policy/middleware.rb:12:in call’
/var/www/discourse/lib/middleware/anonymous_cache.rb:318:in call' rack-2.0.8/lib/rack/session/abstract/id.rb:259:in context’
rack-2.0.8/lib/rack/session/abstract/id.rb:253:in call' actionpack-6.0.1/lib/action_dispatch/middleware/cookies.rb:648:in call’
actionpack-6.0.1/lib/action_dispatch/middleware/callbacks.rb:27:in block in call' activesupport-6.0.1/lib/active_support/callbacks.rb:101:in run_callbacks’
actionpack-6.0.1/lib/action_dispatch/middleware/callbacks.rb:26:in call' actionpack-6.0.1/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in call’
actionpack-6.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:32:in call' actionpack-6.0.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in call’
logster-2.6.2/lib/logster/middleware/reporter.rb:43:in call' railties-6.0.1/lib/rails/rack/logger.rb:38:in call_app’
railties-6.0.1/lib/rails/rack/logger.rb:28:in call' /var/www/discourse/config/initializers/100-quiet_logger.rb:18:in call’
/var/www/discourse/config/initializers/100-silence_logger.rb:31:in call' actionpack-6.0.1/lib/action_dispatch/middleware/remote_ip.rb:81:in call’
actionpack-6.0.1/lib/action_dispatch/middleware/request_id.rb:27:in call' /var/www/discourse/lib/middleware/enforce_hostname.rb:17:in call’
rack-2.0.8/lib/rack/method_override.rb:22:in call' rails_multisite-2.0.7/lib/rails_multisite/middleware.rb:24:in call’
rack-2.0.8/lib/rack/sendfile.rb:111:in call' actionpack-6.0.1/lib/action_dispatch/middleware/host_authorization.rb:77:in call’
rack-mini-profiler-1.1.6/lib/mini_profiler/profiler.rb:296:in call' message_bus-2.2.3/lib/message_bus/rack/middleware.rb:57:in call’
/var/www/discourse/lib/middleware/request_tracker.rb:181:in call' railties-6.0.1/lib/rails/engine.rb:526:in call’
railties-6.0.1/lib/rails/railtie.rb:190:in public_send' railties-6.0.1/lib/rails/railtie.rb:190:in method_missing’
rack-2.0.8/lib/rack/urlmap.rb:68:in block in call' rack-2.0.8/lib/rack/urlmap.rb:53:in each’
rack-2.0.8/lib/rack/urlmap.rb:53:in call' unicorn-5.5.3/lib/unicorn/http_server.rb:605:in process_client’
unicorn-5.5.3/lib/unicorn/http_server.rb:700:in worker_loop' unicorn-5.5.3/lib/unicorn/http_server.rb:548:in spawn_missing_workers’
unicorn-5.5.3/lib/unicorn/http_server.rb:144:in start' unicorn-5.5.3/bin/unicorn:128:in <top (required)>’
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in load' /var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in

1 Like

Please run this command in the rails console and share the output with us.

TopicCustomField.where(name: 'event_going')

@tobiaseigen are you also facing this?

Nope. I am on the same version of the events plugin, and am not having this problem. I haven’t updated for a few days, though.

I’m on discourse 2.4.0.beta11 (cd5b7109d0) - maybe you need to update?

1 Like