Page MenuHomePhabricator

TypeError: Argument 2 passed to GrowthExperiments\MentorDashboard\PersonalizedPraise\PraiseworthyConditions::__construct() must be of the type int, string given, called in /srv/mediawiki/php-1.41.0-wmf.20/extensions/GrowthExper
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   TypeError: Argument 2 passed to GrowthExperiments\MentorDashboard\PersonalizedPraise\PraiseworthyConditions::__construct() must be of the type int, string given, called in /srv/mediawiki/php-1.41.0-wmf.20/extensions/GrowthExper
error.stack_trace
from /srv/mediawiki/php-1.41.0-wmf.20/extensions/GrowthExperiments/includes/MentorDashboard/PersonalizedPraise/PraiseworthyConditions.php(28)
#0 /srv/mediawiki/php-1.41.0-wmf.20/extensions/GrowthExperiments/includes/MentorDashboard/PersonalizedPraise/PersonalizedPraiseSettings.php(110): GrowthExperiments\MentorDashboard\PersonalizedPraise\PraiseworthyConditions->__construct(integer, string, integer)
#1 /srv/mediawiki/php-1.41.0-wmf.20/extensions/GrowthExperiments/includes/MentorDashboard/PersonalizedPraise/PersonalizedPraiseSettings.php(81): GrowthExperiments\MentorDashboard\PersonalizedPraise\PersonalizedPraiseSettings->getPraiseworthyConditions(User)
#2 /srv/mediawiki/php-1.41.0-wmf.20/extensions/GrowthExperiments/includes/MentorDashboard/Modules/PersonalizedPraise.php(145): GrowthExperiments\MentorDashboard\PersonalizedPraise\PersonalizedPraiseSettings->toArray(User)
#3 /srv/mediawiki/php-1.41.0-wmf.20/extensions/GrowthExperiments/includes/DashboardModule/DashboardModule.php(181): GrowthExperiments\MentorDashboard\Modules\PersonalizedPraise->getJsConfigVars()
#4 /srv/mediawiki/php-1.41.0-wmf.20/extensions/GrowthExperiments/includes/DashboardModule/DashboardModule.php(196): GrowthExperiments\DashboardModule\DashboardModule->outputDependencies()
#5 /srv/mediawiki/php-1.41.0-wmf.20/extensions/GrowthExperiments/includes/Specials/SpecialMentorDashboard.php(196): GrowthExperiments\DashboardModule\DashboardModule->render(string)
#6 /srv/mediawiki/php-1.41.0-wmf.20/includes/specialpage/SpecialPage.php(701): GrowthExperiments\Specials\SpecialMentorDashboard->execute(NULL)
#7 /srv/mediawiki/php-1.41.0-wmf.20/includes/specialpage/SpecialPageFactory.php(1564): SpecialPage->run(NULL)
#8 /srv/mediawiki/php-1.41.0-wmf.20/includes/MediaWiki.php(344): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#9 /srv/mediawiki/php-1.41.0-wmf.20/includes/MediaWiki.php(948): MediaWiki->performRequest()
#10 /srv/mediawiki/php-1.41.0-wmf.20/includes/MediaWiki.php(597): MediaWiki->main()
#11 /srv/mediawiki/php-1.41.0-wmf.20/index.php(50): MediaWiki->run()
#12 /srv/mediawiki/php-1.41.0-wmf.20/index.php(46): wfIndexMain()
#13 /srv/mediawiki/w/index.php(3): require(string)
#14 {main}
Notes

This error can be triggered by saving an empty string under "Edits within a time frame" in the Personalized praise module settings (settings filled as on the screenshot below):

image.png (1×1 px, 117 KB)

Mentor dashboard is fully inaccessible when this happens, but it doesn't happen assuming users fill in integers to the form :-).

Details

Request URL
https://test.wikipedia.org/wiki/Special:MentorDashboard

Event Timeline

Urbanecm_WMF created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 944876 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] PersonalizedPraiseSettings: Ignore non-int values

https://gerrit.wikimedia.org/r/944876

This should likely be fixed before we merge the T338263: Add the revert metric to the personal praise mentor's settings patch, as the revert metric is more likely to motivate someone to empty it. Patch for this task and the other one conflict regardless, so rebasing on top of each other.

Change 946512 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] [WIP] WelcomeSurvey: Add user-research question to the bank

https://gerrit.wikimedia.org/r/946512

Change 946512 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] [WIP] WelcomeSurvey: Add user-research question to the bank

https://gerrit.wikimedia.org/r/946512

Please ignore, this patch is unrelated to this task.

Change 944876 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] PersonalizedPraiseSettings: Ignore non-int values

https://gerrit.wikimedia.org/r/944876