https://commons.wikimedia.org/w/index.php?title=Special:UploadWizard&campaign=tos-rs shows the internal error page.
tos-rs is a photo competition campaign which starts on July so I suppose no one's hair is on fire (yet).
https://commons.wikimedia.org/w/index.php?title=Special:UploadWizard&campaign=tos-rs shows the internal error page.
tos-rs is a photo competition campaign which starts on July so I suppose no one's hair is on fire (yet).
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Check campaign content model | mediawiki/extensions/UploadWizard | master | +5 -1 |
https://commons.wikimedia.org/w/index.php?title=Campaign:tos-rs&action=info is a wikitext page, not CampaignContent.
Error is probably
Call to undefined method WikitextContent::getJsonData() in /srv/mediawiki/php1.26wmf11/extensions/UploadWizard/includes/UploadWizardCampaign.php on line 76
I've been using https://gerrit.wikimedia.org/r/#/c/221783/ to fix these issues for now.
Fixed by running this script:
tgr@terbium:~$ mwscript eval.php --wiki=commonswiki > $title = Title::newFromDBkey( 'Campaign:tos-rs' ); > $page = WikiPage::factory( $title ); > $oldData = $page->getContent()->getNativeData(); > $newContent = new CampaignContent( $oldData ); > $page->doEditContent( $newContent, 'Fixing content model', EDIT_UPDATE, false, User::newFromName( 'Tgr_(WMF)' ) );
Thanks for the pointers @Legoktm!
Follow-up:
Odder moved page User:Bojana Wiki PG/Campaign to Campaign:tos-rs without leaving a redirect: let's do it!
This should have either changed the content type (seems fragile) or failed with a clear error message telling the user to copy it by hand.
Change 222042 had a related patch set uploaded (by Gergő Tisza):
Check campaign content model
https://gerrit.wikimedia.org/r/222042
https://gerrit.wikimedia.org/r/#/c/222042/
- add CampaignContent to the fixer script
Done.
- identify source of error
Change 222042 merged by jenkins-bot:
Check campaign content model
https://gerrit.wikimedia.org/r/222042