Follow Plugin 👨

No, it’s just a fix. You might be waiting a while.

3 Likes

Hey - wondering if anyone has seen this issue before?

We are running version 3e800e9, on 2.5.0beta5 (previously beta4 too)

Whenever we try to disable it via this button:
image

All profile pages (eg summary / activity / messages) fail to load. Some display a 404 and some display a 500.

Error from /logs

NoMethodError (undefined method `include?' for nil:NilClass)
/var/www/discourse/plugins/discourse-follow/plugin.rb:74:in `block (2 levels) in activate!'
Backtrace
/var/www/discourse/plugins/discourse-follow/plugin.rb:74:in `block (2 levels) in activate!'

(eval):84: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.rb:343:in `as_json'

activesupport-6.0.3/lib/active_support/json/encoding.rb:22:in `encode'

activesupport-6.0.3/lib/active_support/json/encoding.rb:22:in `encode'

activesupport-6.0.3/lib/active_support/core_ext/object/json.rb:42:in `to_json'

active_model_serializers-0.8.4/lib/active_model/serializer.rb:331:in `to_json'

multi_json-1.14.1/lib/multi_json/adapters/oj.rb:56:in `dump'

multi_json-1.14.1/lib/multi_json/adapters/oj.rb:56:in `dump'

multi_json-1.14.1/lib/multi_json/adapter.rb:25:in `dump'

multi_json-1.14.1/lib/multi_json.rb:139:in `dump'

/var/www/discourse/app/controllers/application_controller.rb:454:in `render_json_dump'

/var/www/discourse/app/controllers/users_controller.rb:94:in `block (2 levels) in show'

actionpack-6.0.3/lib/action_controller/metal/mime_responds.rb:214:in `respond_to'

/var/www/discourse/app/controllers/users_controller.rb:86:in `show'

actionpack-6.0.3/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'

actionpack-6.0.3/lib/abstract_controller/base.rb:195:in `process_action'

actionpack-6.0.3/lib/action_controller/metal/rendering.rb:30:in `process_action'

actionpack-6.0.3/lib/abstract_controller/callbacks.rb:42:in `block in process_action'

activesupport-6.0.3/lib/active_support/callbacks.rb:135:in `run_callbacks'

actionpack-6.0.3/lib/abstract_controller/callbacks.rb:41:in `process_action'

actionpack-6.0.3/lib/action_controller/metal/rescue.rb:22:in `process_action'

actionpack-6.0.3/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'

activesupport-6.0.3/lib/active_support/notifications.rb:180:in `block in instrument'

activesupport-6.0.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'

activesupport-6.0.3/lib/active_support/notifications.rb:180:in `instrument'

actionpack-6.0.3/lib/action_controller/metal/instrumentation.rb:32:in `process_action'

actionpack-6.0.3/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'

activerecord-6.0.3/lib/active_record/railties/controller_runtime.rb:27:in `process_action'

actionpack-6.0.3/lib/abstract_controller/base.rb:136:in `process'

actionview-6.0.3/lib/action_view/rendering.rb:39:in `process'

rack-mini-profiler-2.0.2/lib/mini_profiler/profiling_methods.rb:78:in `block in profile_method'

actionpack-6.0.3/lib/action_controller/metal.rb:190:in `dispatch'

actionpack-6.0.3/lib/action_controller/metal.rb:254:in `dispatch'

actionpack-6.0.3/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'

actionpack-6.0.3/lib/action_dispatch/routing/route_set.rb:33:in `serve'

actionpack-6.0.3/lib/action_dispatch/journey/router.rb:49:in `block in serve'

actionpack-6.0.3/lib/action_dispatch/journey/router.rb:32:in `each'

actionpack-6.0.3/lib/action_dispatch/journey/router.rb:32:in `serve'

actionpack-6.0.3/lib/action_dispatch/routing/route_set.rb:834:in `call'

/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:68:in `call'

rack-2.2.2/lib/rack/tempfile_reaper.rb:15:in `call'

rack-2.2.2/lib/rack/conditional_get.rb:27:in `call'

rack-2.2.2/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.2.2/lib/rack/session/abstract/id.rb:266:in `context'

rack-2.2.2/lib/rack/session/abstract/id.rb:260:in `call'

actionpack-6.0.3/lib/action_dispatch/middleware/cookies.rb:648:in `call'

actionpack-6.0.3/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'

activesupport-6.0.3/lib/active_support/callbacks.rb:101:in `run_callbacks'

actionpack-6.0.3/lib/action_dispatch/middleware/callbacks.rb:26:in `call'

actionpack-6.0.3/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'

actionpack-6.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'

actionpack-6.0.3/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'

logster-2.8.0/lib/logster/middleware/reporter.rb:43:in `call'

railties-6.0.3/lib/rails/rack/logger.rb:37:in `call_app'

railties-6.0.3/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.3/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'

actionpack-6.0.3/lib/action_dispatch/middleware/request_id.rb:27:in `call'

/var/www/discourse/lib/middleware/enforce_hostname.rb:22:in `call'

rack-2.2.2/lib/rack/method_override.rb:24:in `call'

actionpack-6.0.3/lib/action_dispatch/middleware/executor.rb:14:in `call'

rack-2.2.2/lib/rack/sendfile.rb:110:in `call'

actionpack-6.0.3/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'

/var/www/discourse/plugins/discourse-prometheus/lib/middleware/metrics.rb:17:in `call'

rack-mini-profiler-2.0.2/lib/mini_profiler/profiler.rb:200:in `call'

message_bus-3.2.0/lib/message_bus/rack/middleware.rb:57:in `call'

/var/www/discourse/lib/middleware/request_tracker.rb:172:in `call'

railties-6.0.3/lib/rails/engine.rb:527:in `call'

railties-6.0.3/lib/rails/railtie.rb:190:in `public_send'

railties-6.0.3/lib/rails/railtie.rb:190:in `method_missing'

rack-2.2.2/lib/rack/urlmap.rb:74:in `block in call'

rack-2.2.2/lib/rack/urlmap.rb:58:in `each'

rack-2.2.2/lib/rack/urlmap.rb:58:in `call'

unicorn-5.5.5/lib/unicorn/http_server.rb:605:in `process_client'

unicorn-5.5.5/lib/unicorn/http_server.rb:701:in `worker_loop'

unicorn-5.5.5/lib/unicorn/http_server.rb:548:in `spawn_missing_workers'

unicorn-5.5.5/lib/unicorn/http_server.rb:144:in `start'

unicorn-5.5.5/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 `<main>'
Environment
hostname redacted-app
process_id 527
application_version f9335244f88be98a1778c005239ff2031f1c391d
HTTP_HOST redacted
REQUEST_URI /u/redacted.json
REQUEST_METHOD GET
HTTP_USER_AGENT Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36
HTTP_ACCEPT application/json, text/javascript, /; q=0.01
HTTP_REFERER https://redacted.redacted/u/redacted/messages
HTTP_X_FORWARDED_FOR redacted, redacted, redacted
HTTP_X_REAL_IP redacted
username redacted
time 10:18 am

Apologies if there is something obvious I am missing or something stupid I am doing, not the most technical person tbh!

2 Likes

Sounds like a bug. For now remove the plugin completely. If notifications cause problems use the script I shared above with Raj.

1 Like

Thank you, I appreciate the prompt response!

1 Like

I just upgraded today and things look good.

Please upgrade before Monday if you intend to do so this month

1 Like

Hey guys…Is there a Spanish version of the plugin? Or how can I translate it?

1 Like

Sorry for slow reply. If you examine the plugin code you can see a Spanish translation is missing from the locales folder. Checkout how English is done and provide the same for Spanish?

1 Like

I’ve just merged a PR provided by a kind member of the community. This provides some additional settings, which in part enhance user privacy:

  • to globally make Following, Followers private to each user if the site admin wishes them to be
  • to globally silence new Follower notifcations:

Thanks so much @buildthomas! :tada: :beers:

4 Likes

I’ve pushed a fix:

4 Likes

Started getting these today:

Message (11 copies reported)

NoMethodError (undefined method `id' for nil:NilClass)
/var/www/discourse/plugins/discourse-follow/plugin.rb:74:in `block (2 levels) in activate!'

Backtrace

/var/www/discourse/plugins/discourse-follow/plugin.rb:74:in `block (2 levels) in activate!'
(eval):44: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.rb:343:in `as_json'
activesupport-6.0.3.1/lib/active_support/json/encoding.rb:22:in `encode'
activesupport-6.0.3.1/lib/active_support/json/encoding.rb:22:in `encode'
activesupport-6.0.3.1/lib/active_support/core_ext/object/json.rb:42:in `to_json'

Env

HTTP HOSTS: 
2 Likes

Thanks for the report.

Will look at this before next supported upgrade period. (First 5 days of the month)

1 Like

Hello I have a questions when I click follow someone on discourse, what do I get? receiveing notification when they post, it’s mean both question and reple?

and what do you mean by list the lastest topic involving [ex. Like, replie]? And where can I see these list, Could you help to elaborate more?

Thanks!

1 Like

Yes this. Notified when they post.

Involving means they have posted a Topic or Replied with a Post. The plugin creates a new Discovery route called “Following” which you can click and get the filtered list.

1 Like

It seems this plugin is throwing an error in some cases for me, which prevents user cards and user profiles from displaying. I’ve noticed the following cases:

  • When logged in as Admin, it works as expected
  • As an anonymous user, the cards + profiles break
  • For some(?) other users, the cards + profiles break too

In /logs I see:

NoMethodError (undefined method id' for nil:NilClass) /var/www/discourse/plugins/discourse-follow/plugin.rb:74:in block (2 levels) in activate!’

Here’s the full backtrace:

 /var/www/discourse/plugins/discourse-follow/plugin.rb:74:in `block (2 levels) in activate!'

(eval):44: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.rb:343:in `as_json'

activesupport-6.0.3.1/lib/active_support/json/encoding.rb:22:in `encode'

activesupport-6.0.3.1/lib/active_support/json/encoding.rb:22:in `encode'

activesupport-6.0.3.1/lib/active_support/core_ext/object/json.rb:42:in `to_json'

active_model_serializers-0.8.4/lib/active_model/serializer.rb:331:in `to_json'

multi_json-1.14.1/lib/multi_json/adapters/oj.rb:56:in `dump'

multi_json-1.14.1/lib/multi_json/adapters/oj.rb:56:in `dump'

multi_json-1.14.1/lib/multi_json/adapter.rb:25:in `dump'

multi_json-1.14.1/lib/multi_json.rb:139:in `dump'

/var/www/discourse/app/controllers/application_controller.rb:464:in `render_json_dump'

/var/www/discourse/app/controllers/users_controller.rb:94:in `block (2 levels) in show'

actionpack-6.0.3.1/lib/action_controller/metal/mime_responds.rb:214:in `respond_to'

/var/www/discourse/app/controllers/users_controller.rb:86:in `show'

/var/www/discourse/app/controllers/users_controller.rb:100:in `show_card'

actionpack-6.0.3.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'

actionpack-6.0.3.1/lib/abstract_controller/base.rb:195:in `process_action'

actionpack-6.0.3.1/lib/action_controller/metal/rendering.rb:30:in `process_action'

actionpack-6.0.3.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'

activesupport-6.0.3.1/lib/active_support/callbacks.rb:135:in `run_callbacks'

actionpack-6.0.3.1/lib/abstract_controller/callbacks.rb:41:in `process_action'

actionpack-6.0.3.1/lib/action_controller/metal/rescue.rb:22:in `process_action'

actionpack-6.0.3.1/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'

activesupport-6.0.3.1/lib/active_support/notifications.rb:180:in `block in instrument'

activesupport-6.0.3.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'

activesupport-6.0.3.1/lib/active_support/notifications.rb:180:in `instrument'

actionpack-6.0.3.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'

actionpack-6.0.3.1/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'

activerecord-6.0.3.1/lib/active_record/railties/controller_runtime.rb:27:in `process_action'

actionpack-6.0.3.1/lib/abstract_controller/base.rb:136:in `process'

actionview-6.0.3.1/lib/action_view/rendering.rb:39:in `process'

rack-mini-profiler-2.0.2/lib/mini_profiler/profiling_methods.rb:78:in `block in profile_method'

actionpack-6.0.3.1/lib/action_controller/metal.rb:190:in `dispatch'

actionpack-6.0.3.1/lib/action_controller/metal.rb:254:in `dispatch'

actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'

actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:33:in `serve'

actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:49:in `block in serve'

actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:32:in `each'

actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:32:in `serve'

actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:834:in `call'

/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:68:in `call'

rack-2.2.2/lib/rack/tempfile_reaper.rb:15:in `call'

rack-2.2.2/lib/rack/conditional_get.rb:27:in `call'

rack-2.2.2/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:316:in `call'

/var/www/discourse/config/initializers/008-rack-cors.rb:25:in `call'

rack-2.2.2/lib/rack/session/abstract/id.rb:266:in `context'

rack-2.2.2/lib/rack/session/abstract/id.rb:260:in `call'

actionpack-6.0.3.1/lib/action_dispatch/middleware/cookies.rb:648:in `call'

actionpack-6.0.3.1/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'

activesupport-6.0.3.1/lib/active_support/callbacks.rb:101:in `run_callbacks'

actionpack-6.0.3.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'

actionpack-6.0.3.1/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'

actionpack-6.0.3.1/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'

actionpack-6.0.3.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'

logster-2.9.0/lib/logster/middleware/reporter.rb:43:in `call'

railties-6.0.3.1/lib/rails/rack/logger.rb:37:in `call_app'

railties-6.0.3.1/lib/rails/rack/logger.rb:28:in `call'

/var/www/discourse/config/initializers/100-quiet_logger.rb:19:in `call'

/var/www/discourse/config/initializers/100-silence_logger.rb:31:in `call'

actionpack-6.0.3.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'

actionpack-6.0.3.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'

/var/www/discourse/lib/middleware/enforce_hostname.rb:22:in `call'

rack-2.2.2/lib/rack/method_override.rb:24:in `call'

actionpack-6.0.3.1/lib/action_dispatch/middleware/executor.rb:14:in `call'

rack-2.2.2/lib/rack/sendfile.rb:110:in `call'

actionpack-6.0.3.1/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'

rack-mini-profiler-2.0.2/lib/mini_profiler/profiler.rb:200:in `call'

message_bus-3.3.1/lib/message_bus/rack/middleware.rb:61:in `call'

/var/www/discourse/lib/middleware/request_tracker.rb:176:in `call'

railties-6.0.3.1/lib/rails/engine.rb:527:in `call'

railties-6.0.3.1/lib/rails/railtie.rb:190:in `public_send'

railties-6.0.3.1/lib/rails/railtie.rb:190:in `method_missing'

rack-2.2.2/lib/rack/urlmap.rb:74:in `block in call'

rack-2.2.2/lib/rack/urlmap.rb:58:in `each'

rack-2.2.2/lib/rack/urlmap.rb:58:in `call'

unicorn-5.5.5/lib/unicorn/http_server.rb:605:in `process_client'

unicorn-5.5.5/lib/unicorn/http_server.rb:701:in `worker_loop'

unicorn-5.5.5/lib/unicorn/http_server.rb:548:in `spawn_missing_workers'

unicorn-5.5.5/lib/unicorn/http_server.rb:144:in `start'

unicorn-5.5.5/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 `<main>'

Note that I’m not on the latest version as I’m locked in to the ‘first 5 days of the month’ update support by Topic List Previews.

3 Likes

Thanks for the report Bart. I will look at it very soon.

3 Likes

User card should be fixed: FIX: user card not working for anon · paviliondev/discourse-follow@abc4c05 · GitHub

3 Likes

As discussed on PM we believe that resolves all the issues. Thanks again for the sleuthing!

2 Likes

Always a pleasure, thanks for your help!

2 Likes

From the question Follow a particular user/account, I’m thinking if renaming this topic to Follow Users Plugin doesn’t make sense. The description in OP sais the same thing, but i think the tautology is accepted.

2 Likes

In case anyone wants to check how popular take-up is after installing, just run the following (ahem) query in Data Explorer:

SELECT * FROM user_custom_fields WHERE name IN ('followers', 'following')

If that list is short, then you might want to promote the feature some more …

2 Likes