ウォッチワードを含む投稿はすべて自動的に非表示になります — score_to_hide_post は 0.0 です

I’ve run into a serious issue with my Discourse forum.

Recently I found that all posts containing watched words that trigger a flag are automatically hidden.
These posts must be manually unhidden by an admin to become visible again.

After some investigation, I noticed that my site’s score_to_hide_post value is currently 0.0.
On another Discourse instance I run, this value is around 8.3, which seems normal.

Because of this 0.0 value, any flag — even a single one from a watched word — immediately hides the post.

I haven’t made any setting changes recently. Why would score_to_hide_post become 0.0?

How can I restore it to a normal threshold (like 8.3) so that posts aren’t hidden right away?

I found that since score_to_hide_post is 0.0, even a single flag from a new user will immediately hide the post, which makes the situation quite serious. What should I do?

You can fix this by adjusting the Hide Post Sensitivity site setting. Set it to a suitable level such as Medium or High — this will automatically update the internal score_to_hide_post value back to a healthy threshold.

Just note that the lower the sensitivity, the less flag score is required to hide a post — which is why posts were getting hidden immediately.

Reference for how this maps internally:

「いいね!」 1

Thanks for the suggestion! I tried adjusting the Hide Post Sensitivity site setting in the admin panel, which has four options: Disabled, Low, Medium, and High.
However, I found that only Disabled works. No matter whether I choose Low, Medium, or High, the score_to_hide_post value remains 0.
Do you know why this happens?

I have a question regarding score_to_hide_post.

I understand that score_to_hide_post is dynamically calculated based on reviewables, but is it possible for it to ever be calculated as 0 under normal circumstances?

If it is showing 0, does that indicate a system problem?

AFIK, in standard operation with Hide Post Sensitivity set to “Low, Medium, or High”, the threshold should be a positive number. If you see score_to_hide_post = 0 when the sensitivity is NOT “Disabled”, this indicates a system misconfiguration. Possible causes include:

  • Corrupt or missing values in the PluginStore
  • Issues with your SiteSettings (e.g., reviewable_default_visibility misconfigured)

The reviewable_default_visibility setting is still at its default value, low. After the issue occurred, I even tried rebuilding the site, but it did not resolve the problem. I would like to understand how this issue appeared in the first place and whether it can be fixed.

I’ve studied the code carefully and found that score_to_hide_post is determined by the following three methods:

def self.sensitivity_score_value(sensitivity, scale)
  return Float::MAX if sensitivity == 0

  ratio = sensitivity / sensitivities[:low].to_f
  high =
    (PluginStore.get("reviewables", "priority_#{priorities[:high]}") || typical_sensitivity).to_f

  # We want this to be hard to reach
  ((high.to_f * ratio) * scale).truncate(2)
end

def self.sensitivity_score(sensitivity, scale: 1.0)
  # If the score is less than the default visibility, bring it up to that level.
  # Otherwise we have the confusing situation where a post might be hidden and
  # moderators would never see it!
  [sensitivity_score_value(sensitivity, scale), min_score_for_priority].max
end

def self.score_required_to_hide_post
  sensitivity_score(SiteSetting.hide_post_sensitivity)
end

So, in other words,
score_to_hide_post = ((high.to_f * ratio) * scale).truncate(2)

where

  • high.to_f = 10,
  • ratio = sensitivity / sensitivities[:low].to_f,
  • sensitivity comes from the setting (for example 3, 6, or 9),
  • sensitivities[:low] = 9,
  • scale = 1.0.

That means score_to_hide_post should never be 0, so if it becomes 0, something must be wrong.

Also, my Discourse instance hasn’t had any setting changes recently — I only updated Discourse. I don’t know why score_to_hide_post suddenly became 0 after that update.