哦,我完全没问题。即使下拉按钮的主要操作是“删除用户”,而通过下拉菜单可以选择“暂停用户”,那也将是理想方案。这样,假设大多数并非单点登录(SSO)环境,就不会为他们增加额外工作;而对于处于这种情况的用户,则提供了一种快速暂停用户而非删除用户的方式。
@Roman,你想把这个也加到你的清单里吗?我觉得它对使用单点登录(SSO)的网站很有用。
我会看一下。这些用户是在等待审批吗?
批准并删除被标记为垃圾信息的用户。
我刚刚意识到,我管理的另一个网站并没有出现这种情况,我隐隐怀疑这可能与关注插件有关,因为该插件最近进行了一些与已删除用户相关的更改。@merefield,你怎么看?
目前还不清楚。你能具体说明一下吗?有日志证据吗?
浏览器中的网络标签页:那个 404 错误的 URL 是什么?
目前该插件唯一(轻微的)问题(据我所知)是,如果你卸载插件,必须删除相关的通知(插件首帖中的脚本)。这与已删除用户无关。
下次发生这种情况时我会的:+1
该插件对 UserDestroyer 进行了猴子补丁(monkey patch),而当你从审核队列中执行删除操作时会调用它。这看起来很可疑:
如果 following_ids 中包含了无效的 ID,User#find 将会抛出异常,用户会看到“404 Not Found”错误。我建议使用 User.find_by(id: ...) 代替。
在不查看数据库的情况下,我无法确定 @bartv 的站点是否发生了这种情况。因此,下次发生此类问题时,建议检查被标记用户的 following_ids。
谢谢。确实如此,这是一个非常有用的亮点。
我仍然希望确认日志和那个 404 的 URL。
可能还有更多方法可以让它更加健壮。
已推送:FIX: make code invoked when deleting users more robust · discourse/discourse-follow@b523b3a · GitHub 谢谢!
我移除了 Follow 插件,但问题依然存在。在 Rails 日志中我看到:
Started PUT "/review/6793/perform/reject_user_block?version=0" for xx.xx.xx.xx at 2020-09-03 09:45:48 +0000
Processing by ReviewablesController#perform as */*
Parameters: {"version"=>"0", "reviewable_id"=>"6793", "action_id"=>"reject_user_block"}
Job exception: undefined method `strip' for nil:NilClass
Rendering text template
Rendered text template (Duration: 0.0ms | Allocations: 1)
Started GET "/t/global-variables/331828" for xx.xx.xx.xx at 2020-09-03 09:45:48 +0000
Processing by TopicsController#show as HTML
Parameters: {"slug"=>"global-variables", "topic_id"=>"331828"}
Completed 404 Not Found in 292ms (ActiveRecord: 0.0ms | Allocations: 124598)
ActiveRecord::RecordNotFound (Couldn't find all Topics with 'id': (1185852, 1185853, 1186324, 1186929, 1191089) [WHERE ("topics"."deleted_at" IS NULL)] (found 4 results, but was looking for 5).)
lib/plugin/instance.rb:393:in `block in on'
lib/discourse_event.rb:14:in `block in trigger'
lib/discourse_event.rb:13:in `trigger'
app/models/user.rb:1567:in `trigger_user_destroyed_event'
app/models/reviewable.rb:353:in `perform'
app/controllers/reviewables_controller.rb:192:in `perform'
app/controllers/application_controller.rb:340:in `block in with_resolved_locale'
app/controllers/application_controller.rb:340:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:68:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:336:in `call'
config/initializers/008-rack-cors.rb:25:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:22:in `call'
lib/middleware/request_tracker.rb:176:in `call'
ActiveRecord::RecordNotFound 这一行很值得关注,因为每次我尝试从审核队列中删除用户时都会出现,并且涉及的帖子 ID 完全相同。
我检查了这些帖子 ID,发现它们都使用了 Events 插件。果然,其中一个帖子已被删除。我不明白为什么审核队列中的这个操作会检查这些帖子?
@merefield 看来我又来麻烦你们了,抱歉 ![]()
编辑:更新了插件链接
这是一个核心插件。
等等,我正在使用
git clone GitHub - angusmcleod/discourse-events: Allows you to manage events in Discourse · GitHub
这个是不是不对(或者已经过时了)?(我觉得我可能链接到了错误的页面,正在修正)
这就是活动。@fzngagan 对此有什么看法?
点击它会指向正确的代码库。
哈哈,不是的,问题在于从审核队列中删除用户。
这与插件无关,这是一个核心库文件。
你为什么认为 Events 与此有关?


