Akismet Server Error


(Karl Romanowski) #1

Hi,

Akismet flagged a few posts as spam and after clicking delete spammer a few times the Akismet page now shows:
image

From /logs I see:

Message (29 copies reported)

NoMethodError (undefined method staff?' for nil:NilClass) /var/www/discourse/lib/guardian/post_guardian.rb:26:inpost_can_act?’

Backtrace

/var/www/discourse/lib/guardian/post_guardian.rb:26:in post_can_act?' /var/www/discourse/app/serializers/post_serializer.rb:239:inblock in actions_summary’ /var/www/discourse/app/serializers/post_serializer.rb:232:in each' /var/www/discourse/app/serializers/post_serializer.rb:232:inactions_summary’ (eval):42:in _fast_attributes' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:467:inrescue in attributes’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:455:in attributes' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:479:in_serializable_hash’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:361:in serializable_hash' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/active_model_serializers-0.8.3/lib/active_model/array_serializer.rb:89:inblock in _serializable_array’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/active_model_serializers-0.8.3/lib/active_model/array_serializer.rb:79:in map' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/active_model_serializers-0.8.3/lib/active_model/array_serializer.rb:79:in_serializable_array’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/active_model_serializers-0.8.3/lib/active_model/array_serializer.rb:73:in serializable_array' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/active_model_serializers-0.8.3/lib/active_model/array_serializer.rb:53:inas_json’ /var/www/discourse/app/controllers/application_controller.rb:366:in serialize_data' /var/www/discourse/plugins/discourse-akismet/app/controllers/discourse_akismet/admin_mod_queue_controller.rb:7:inindex’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.rb:4:in send_action' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:inprocess_action’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30:in process_action' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:inblock in process_action’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:131:in run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:inprocess_action’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20:in process_action' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32:inblock in process_action’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in block in instrument' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:ininstrument’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in instrument' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30:inprocess_action’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252:in process_action' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/railties/controller_runtime.rb:22:inprocess_action’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in process' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:inprocess’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiling_methods.rb:78:in block in profile_method' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:indispatch’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in dispatch' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:indispatch’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in serve' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:16:inblock in <class:Constraints>’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:46:in serve' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:inblock in serve’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in each' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:inserve’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in public_send' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:inmethod_missing’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:17:in block in &lt;class:Constraints&gt;' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:46:inserve’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in block in serve' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:ineach’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in serve' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.1/lib/rack/protection/frame_options.rb:31:in call' /var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:24:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/conditional_get.rb:25:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/head.rb:12:incall’ /var/www/discourse/lib/middleware/anonymous_cache.rb:200:in call' /var/www/discourse/config/initializers/008-rack-cors.rb:25:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:in context' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:inblock in call’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/logster-1.2.9/lib/logster/middleware/reporter.rb:31:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36:incall_app’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:26:in call' /var/www/discourse/config/initializers/100-quiet_logger.rb:16:incall’ /var/www/discourse/config/initializers/100-silence_logger.rb:29:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/method_override.rb:22:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/sendfile.rb:111:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiler.rb:174:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/message_bus-2.1.5/lib/message_bus/rack/middleware.rb:63:incall’ /var/www/discourse/lib/middleware/request_tracker.rb:186:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522:incall’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in public_send' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:inmethod_missing’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/urlmap.rb:68:in block in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/urlmap.rb:53:ineach’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:606:inprocess_client’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:701:in worker_loop' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:549:inspawn_missing_workers’ /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:142:in start' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/bin/unicorn:126:in<top (required)>’ /var/www/discourse/vendor/bundle/ruby/2.4.0/bin/unicorn:23:in load' /var/www/discourse/vendor/bundle/ruby/2.4.0/bin/unicorn:23:in<main>’

Let me know if any other information would help.


(Karl Romanowski) #2

Okay that’s weird, but the page loads fine when setting ‘allow flagging staff’ to true.


(Jeff Atwood) #3

Could this be a bug with that setting @eviltrout?


(Robin Ward) #4

I highly doubt it. I suspect the bug is the user was deleted and some JSON payload was still including their deleted record.

I think the flag setting is a red herring.