Page MenuHomePhabricator

tos-rc campaign breaks UploadWizard
Closed, ResolvedPublic

Description

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

Event Timeline

Tgr created this task.Jun 30 2015, 10:34 PM
Tgr raised the priority of this task from to High.
Tgr updated the task description. (Show Details)
Tgr added a subscriber: Tgr.
Restricted Application added a project: Multimedia. · View Herald TranscriptJun 30 2015, 10:34 PM
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript
Tgr added a subscriber: tomasz.Jun 30 2015, 10:35 PM
Restricted Application added a subscriber: Matanya. · View Herald TranscriptJun 30 2015, 10:35 PM
Tgr added a comment.Jun 30 2015, 10:37 PM

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.

Tgr added a comment.Jun 30 2015, 11:00 PM

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:

  • add error handling in UW
  • add CampaignContent to the fixer script
  • identify source of error
Tgr added a comment.Jun 30 2015, 11:01 PM

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

Tgr closed this task as Resolved.Jul 1 2015, 12:39 AM
Tgr claimed this task.

Follow-up:

  • add error handling in UW

https://gerrit.wikimedia.org/r/#/c/222042/

  • add CampaignContent to the fixer script

Done.

  • identify source of error

T104408

Change 222042 merged by jenkins-bot:
Check campaign content model

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