# ArgumentError：参数数量错误（已提供 0 个，预期 1 个）在 upcoming\_change\_stable\_opted\_out 问题检查中——导致日志泛滥

**URL:** <https://meta.discourse.org/t/argumenterror-wrong-number-of-arguments-given-0-expected-1-in-upcoming-change-stable-opted-out-problem-check-flooding-logs/407351>\
**Category:** Support\
**Created:** [2026年七月12日 04:27 UTC](https://meta.discourse.org/t/argumenterror-wrong-number-of-arguments-given-0-expected-1-in-upcoming-change-stable-opted-out-problem-check-flooding-logs/407351 "2026-07-12T04:27:50Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [2026年七月15日 05:54 UTC](https://meta.discourse.org/t/argumenterror-wrong-number-of-arguments-given-0-expected-1-in-upcoming-change-stable-opted-out-problem-check-flooding-logs/407351/6 "2026-07-15T05:54:06Z")

</div>

将通过此修复：

> <https://github.com/discourse/discourse/pull/41724>
>
> ProblemCheck#run was calling translation\_data with no args while
> persisting tra…cker/admin notice details. For targeted checks like
> \`group\_email\_credentials\` and \`upcoming\_change\_stable\_opted\_out\`,
> \`translation\_data\` requires the target, so scheduled runs crashed after
> call returned a problem. This was causing an error like this in
> production:
> 
> \`\`\`
> A scheduled admin dashboard problem check (group\_email\_credentials) errored. : ArgumentError : wrong number of arguments (given 0, expected 1)
> /var/www/discourse/app/services/problem\_check/group\_email\_credentials.rb:35:in 'translation\_data'
> /var/www/discourse/app/models/problem\_check.rb:203:in 'ProblemCheck#run'
> /var/www/discourse/app/jobs/regular/run\_problem\_check.rb:23:in 'Jobs::RunProblemCheck#execute'
> /var/www/discourse/app/jobs/base.rb:313:in 'block (2 levels) in Jobs::Base#perform'
> \`\`\`
> 
> The intended flow after the fix now:
> 
> \* targets provides the scheduler/tracker key.
> \* problem(target) is where target-specific translation data is computed.
> \* Problem#details carries that computed translation data plus override\_data.
> \* run persists problem.details instead of recalculating translation\_data.
> 
> c.f. https://meta.discourse.org/t/argumenterror-wrong-number-of-arguments-given-0-expected-1-in-upcoming-change-stable-opted-out-problem-check-flooding-logs/407351

---

_[View the full topic](https://meta.discourse.org/t/argumenterror-wrong-number-of-arguments-given-0-expected-1-in-upcoming-change-stable-opted-out-problem-check-flooding-logs/407351)._
