Page MenuHomePhabricator

"Wrong content model" exception when creating a new campaign by moving a page in UploadWizardCampaign constructor
Closed, ResolvedPublicPRODUCTION ERROR

Description

Steps leading to the error:

  1. Moved an user page to https://commons.wikimedia.org/wiki/Campaign:bpbpe
  2. Visited https://commons.wikimedia.org/wiki/Special:UploadWizard?campaign=bpbpe

UploadWizard campaigns are JSON documents, but an user had the idea to create it in a sandbox, then ask for a move... providing to the extension an unexpected content type.

An error to move would be nice, automatic conversion would be nicer.

Logstash: AVdeVJdvJLU8TfYDB8kD

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Dereckson renamed this task from "Wrong content model" exception when creating a new campaign in UploadWizardCampaign constructor to "Wrong content model" exception when creating a new campaign by moving a page in UploadWizardCampaign constructor.Sep 24 2016, 10:52 PM
Dereckson updated the task description. (Show Details)

Change 313534 had a related patch set uploaded (by Bartosz Dziewoński):
Disallow creating non-campaign pages in the Campaign namespace

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

Change 313534 merged by jenkins-bot:
Disallow creating non-campaign pages in the Campaign namespace

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

matmarex claimed this task.
matmarex removed a project: Patch-For-Review.
matmarex subscribed.

Trying to move a non-Campaign page into the Campaign namespace will now fail with "You do not have permission to move this page, for the following reason: "wikitext" content is not allowed on page Campaign:Asdf". (Attempting to circumvent this using Special:ChangeContentModel won't work either.)

However, Special:ChangeContentModel can still be used (by sysops) to fix any broken pages in wrong namespaces.

(The change will be deployed to Commons next week, on Thursday, 5 October 2016, per the schedule: https://www.mediawiki.org/wiki/MediaWiki_1.28/Roadmap.)

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM