Page MenuHomePhabricator

Test PageAssessments extension on Beta Labs
Closed, ResolvedPublic3 Estimated Story Points

Description

Once all the PageAssessments code is merged, turn it on on Beta Labs and test it there. Make sure the data is getting stored and can be retrieved with the API.

Event Timeline

kaldari raised the priority of this task from to Low.
kaldari updated the task description. (Show Details)
kaldari added a project: Community-Tech-Sprint.
kaldari subscribed.
DannyH edited a custom field.

Change 292158 had a related patch set uploaded (by Kaldari):
Test PageAssessments extension on Labs

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

Change 292158 merged by jenkins-bot:
Test PageAssessments extension on Labs

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

Need to run the database updates on Beta Labs first.

Change 292376 had a related patch set uploaded (by Kaldari):
Test PageAssessments on Beta Labs

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

Change 292376 merged by jenkins-bot:
Test PageAssessments on Beta Labs

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

PageAssessments is now live on Beta Labs:
http://simple.wikipedia.beta.wmflabs.org/wiki/Special:Version

Wheeeeee! Are you planning to test the api or should I go ahead and do that?

When this was first deployed to Beta Labs, it caused the following error temporarily:

MWException from line 335 of /srv/mediawiki/php-master/includes/MagicWord.php: Error: invalid magic word 'assessment'
#0 /srv/mediawiki/php-master/includes/MagicWord.php(260): MagicWord->load(string)
#1 /srv/mediawiki/php-master/includes/parser/Parser.php(4762): MagicWord::get(string)
#2 /srv/mediawiki/php-master/extensions/PageAssessments/PageAssessments.hooks.php(31): Parser->setFunctionHook(string, string)
#3 /srv/mediawiki/php-master/includes/Hooks.php(195): PageAssessmentsHooks::onParserFirstCallInit(Parser)
etc.

We need to figure out how to prevent this. bd808 said it may be due to not syncing InitializeSettings.php first.

My guess is that it's trying to execute

$parser->setFunctionHook( 'assessment', 'PageAssessmentsBody::cacheAssessment' );

before the i18n caches have been rebuilt by scap. Magic words (such as parser functions) have i18n aliases, so I bet the magic word has to be present in the i18n caches before you can actually start using it. That would explain why the error was temporary. @brion @Reedy: Does that sound like a reasonable theory?

We may need to put the parser function functionality behind a global config variable and turn it on after PageAssessments is already live on the wikis.

Alternately, we could put $parser->setFunctionHook( 'assessment', 'PageAssessmentsBody::cacheAssessment' ); in a try block and use MWExceptionHandler::logException().

My guess is that it's trying to execute

$parser->setFunctionHook( 'assessment', 'PageAssessmentsBody::cacheAssessment' );

before the i18n caches have been rebuilt by scap. Magic words (such as parser functions) have i18n aliases, so I bet the magic word has to be present in the i18n caches before you can actually start using it. That would explain why the error was temporary. @brion @Reedy: Does that sound like a reasonable theory?

First add the extension.json to extension-list, run scap, then enable the extension through wfLoadExtension(), sync-dir, and you'll be good.

@Legoktm: Thanks for the tip. We'll try that.

kaldari moved this task from In Development to Q1 2018-19 on the Community-Tech-Sprint board.