# 与系统不一致时出现HTTP 500错误

**URL:** https://meta.discourse.org/t/http-500-when-disagreeing-with-system/233599
**Category:** Support
**Created:** [2022年七月22日 00:08 UTC](https://meta.discourse.org/t/http-500-when-disagreeing-with-system/233599 "2022-07-22T00:08:47Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [2022年七月22日 00:08 UTC](https://meta.discourse.org/t/http-500-when-disagreeing-with-system/233599/1 "2022-07-22T00:08:47Z")

</div>

前几天，一名用户被标记为垃圾信息，当我点击“Disagree”时，我收到了一个 HTTP500 错误。现在，当我尝试拒绝系统标记的帖子时，又遇到了同样的问题。

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/7/7/c77fa9ba3128fabe4c8c8f26f85a9b9e77d3368a.png)  
我 99% 确定这不可能是插件或组件的问题。我使用的是最新的提交，这非常令人烦恼。

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2022年七月22日 00:30 UTC](https://meta.discourse.org/t/http-500-when-disagreeing-with-system/233599/2 "2022-07-22T00:30:03Z")

</div>

请查看 `yoursite/logs`，完整的错误消息是什么（有一个复制日志消息按钮）

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [2022年七月22日 00:32 UTC](https://meta.discourse.org/t/http-500-when-disagreeing-with-system/233599/3 "2022-07-22T00:32:41Z")

</div>

我认为可能是这个。

```plaintext
Message (2 copies reported)

NoMethodError (undefined method `rating_types' for nil:NilClass)
lib/plugin/instance.rb:285:in `public_send'
lib/plugin/instance.rb:285:in `block (2 levels) in add_to_class'
lib/plugin/instance.rb:466:in `block in on'
lib/discourse_event.rb:14:in `block in trigger'
lib/discourse_event.rb:13:in `trigger'
lib/post_destroyer.rb:104:in `recover'
app/models/reviewable.rb:357:in `public_send'
app/models/reviewable.rb:357:in `block in perform'
app/models/reviewable.rb:355:in `perform'
app/controllers/reviewables_controller.rb:200:in `perform'
app/controllers/application_controller.rb:415:in `block in with_resolved_locale'
app/controllers/application_controller.rb:415:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:368: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:23:in `call'
lib/middleware/request_tracker.rb:202:in `call'

Backtrace

plugins/discourse-ratings/plugin.rb:147:in `block (2 levels) in activate!'
lib/plugin/instance.rb:285:in `public_send'
lib/plugin/instance.rb:285:in `block (2 levels) in add_to_class'
plugins/discourse-ratings/plugin.rb:67:in `block in activate!'
lib/plugin/instance.rb:466:in `block in on'
lib/discourse_event.rb:14:in `block in trigger'
/usr/local/lib/ruby/2.7.0/set.rb:328:in `each_key'
/usr/local/lib/ruby/2.7.0/set.rb:328:in `each'
lib/discourse_event.rb:13:in `trigger'
lib/post_destroyer.rb:104:in `recover'

Env

HTTP HOSTS: community.icecavern.xyz

```

如果不是这个，那就是这个

```plaintext
Message (4 copies reported)

Deprecation notice: PostAction.act is deprecated. Use `PostActionCreator` instead. (removal in Discourse 2.9.0) 
At /var/www/discourse/plugins/discourse-perspective-api/lib/discourse_perspective.rb:73:in `flag_on_scores`

Backtrace

/var/www/discourse/lib/discourse.rb:877:in `deprecate'
/var/www/discourse/app/models/post_action.rb:106:in `act'
/var/www/discourse/plugins/discourse-perspective-api/lib/discourse_perspective.rb:73:in `flag_on_scores'
/var/www/discourse/plugins/discourse-perspective-api/lib/discourse_perspective.rb:99:in `check_post_toxicity'
/var/www/discourse/plugins/discourse-perspective-api/jobs/flag_toxic_post.rb:13:in `execute'
/var/www/discourse/app/jobs/base.rb:237:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:80:in `with_connection'
/var/www/discourse/app/jobs/base.rb:226:in `block in perform'
/var/www/discourse/app/jobs/base.rb:222:in `each'
/var/www/discourse/app/jobs/base.rb:222:in `perform'

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2022年七月22日 00:35 UTC](https://meta.discourse.org/t/http-500-when-disagreeing-with-system/233599/4 "2022-07-22T00:35:12Z")

</div>

> [@darkpixlz](#):
>
> `discourse-ratings`

很可能，问题出在：

> [@Topic Ratings Plugin](https://meta.discourse.org/t/topic-ratings-plugin/39578):
>
> A Discourse plugin that lets you use topics to rate things! Features Rate topics by a star rating system in the composer. Enable different rating types on a per-category or per-tag basis. Toggle rating count and average rating per rating type. Toggle visibility of ratings, counts and averages based on user roles. Bulk actions including rating type migration [page_facing_up Get the code](https://github.com/paviliondev/discourse-ratings)[bug Report a bug](https://discourse.pluginmanager.org/w/bug-report)Lost? Not sure how to install a plugin? [Follow the steps here](https://meta.discourse.org/t/install-plugins-in-discourse/19157). Mak…

建议您先尝试卸载该插件？如果问题解决，我们就关闭此话题，并在评分插件的综合话题中报告？

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [2022年七月22日 00:36 UTC](https://meta.discourse.org/t/http-500-when-disagreeing-with-system/233599/5 "2022-07-22T00:36:09Z")

</div>

我可能会禁用该插件，因为它引起了很多问题，而且它并不是那么重要。谢谢，当我收到另一个不违反规则的标志时，我会跟进。

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2022年七月22日 00:36 UTC](https://meta.discourse.org/t/http-500-when-disagreeing-with-system/233599/6 "2022-07-22T00:36:46Z")

</div>

好的，暂时移至 #Support
