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.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T120219 PageAssessments deployment to WMF wikis | |||
Resolved | Niharika | T125551 Test PageAssessments extension on Beta Labs |
Event Timeline
Change 292158 had a related patch set uploaded (by Kaldari):
Test PageAssessments extension on Labs
Change 292376 had a related patch set uploaded (by Kaldari):
Test PageAssessments on Beta Labs
PageAssessments is now live on Beta Labs:
http://simple.wikipedia.beta.wmflabs.org/wiki/Special:Version
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().
It works nicely:
Querying for project:
http://simple.wikipedia.beta.wmflabs.org/w/api.php?action=query&list=projectpages&wppprojects=Medicine&wppassessments=true
Querying for page title(s):
http://simple.wikipedia.beta.wmflabs.org/w/api.php?action=query&prop=pageassessments&titles=Bandage|Medicine&formatversion=2
First add the extension.json to extension-list, run scap, then enable the extension through wfLoadExtension(), sync-dir, and you'll be good.