Page MenuHomePhabricator

Test PageAssessments extension on Beta Labs
Closed, ResolvedPublic3 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 created this task.Feb 2 2016, 6:25 PM
kaldari updated the task description. (Show Details)
kaldari raised the priority of this task from to Low.
kaldari added a project: Community-Tech-Sprint.
kaldari added a subscriber: kaldari.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 2 2016, 6:25 PM
DannyH set Security to None.Feb 2 2016, 6:26 PM
DannyH edited a custom field.
kaldari moved this task from Untriaged to Bug backlog on the Community-Tech board.Mar 3 2016, 6:13 PM
kaldari updated the task description. (Show Details)May 25 2016, 11:43 PM
kaldari moved this task from Bug backlog to Ready for development on the Community-Tech board.

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

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

kaldari claimed this task.Jun 1 2016, 3:26 PM
kaldari moved this task from Ready to In Development on the Community-Tech-Sprint board.

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?

kaldari reassigned this task from kaldari to Niharika.Jun 3 2016, 6:19 PM
kaldari added a comment.EditedJun 3 2016, 6:26 PM

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.

kaldari added a comment.EditedJun 3 2016, 6:46 PM

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().

Legoktm added a subscriber: Legoktm.Jun 6 2016, 6:38 PM

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 closed this task as Resolved.Jun 6 2016, 11:35 PM
kaldari moved this task from In Development to Q1 2018-19 on the Community-Tech-Sprint board.