Page MenuHomePhabricator

Non-Flow pages can be moved to the Topic namespace, and cannot be moved back
Closed, ResolvedPublic

Description

On enwiki's village pump today it was reported that a user moved the page Kuttiattoor Thittayil Sree Daivathar Temple to Topic:Kuttiattoor Thittayil Sree Daivathar Temple and administrators can't move it back. When a move is attempted with Special:MovePage the following error message is displayed: "You do not have permission to move this page, for the following reason: Moving a discussion board is currently not supported."

We need two things to happen here:

  1. Someone to edit the database to move "Topic:Kuttiattoor Thittayil Sree Daivathar Temple" back to "Kuttiattoor Thittayil Sree Daivathar Temple", and check if any other pages might be affected.
  2. MediaWiki/Flow to be patched to not allow pages to be moved to the Topic namespace.

Details

Related Gerrit Patches:
mediawiki/extensions/Flow : wmf/1.25wmf14Live hack to allow repair of page in wrong namespace
mediawiki/extensions/Flow : masterLive hack to allow repair of page in wrong namespace
mediawiki/extensions/Flow : wmf/1.25wmf15Disallow moving in Topic: namespace
mediawiki/extensions/Flow : wmf/1.25wmf14Disallow moving in Topic: namespace
mediawiki/extensions/Flow : masterDisallow moving in Topic: namespace

Event Timeline

MrStradivarius raised the priority of this task from to Unbreak Now!.
MrStradivarius updated the task description. (Show Details)
MrStradivarius added a subscriber: MrStradivarius.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 22 2015, 11:32 PM
MrStradivarius set Security to None.

There might be a use-case for moving stuff to/from the Topic namespace, but until one's established, and pages can be moved back, I agree it should be disallowed. I've set up filter 658 to help prevent it from happening again in the meantime.

An Abuse filter isn't a very sound way to deal with this. It wouldn't be hard to eliminate that option from the menu with JavaScript in MediaWiki:Common.js.

if ( mw.config.get( 'wgCanonicalNamespace' ) === "Special" && mw.config.get( 'wgCanonicalSpecialPageName' ) === "Movepage" ) {
    $( '#wpNewTitleNs option[value=2600]' ).remove();
}

Would probably be a better band-aid if one is needed.

TTO edited projects, added Shell; removed acl*sre-team.Jan 23 2015, 1:07 AM

What's unsound about using an edit filter? It's the surest way to prevent other moves to the namespace from happening. That client-side fix could be accidentally or maliciously bypassed simply by disabling JavaScript. That said, it seems like a good idea to make the option invisible as well as using a filter.

Flow must implement the NamespaceIsMovable hook to disable page moves for its namespaces.

Krenair added a subscriber: TTO.Jan 23 2015, 2:33 AM

@TTO: You added the shell project. What is there for us to do here exactly?

@TTO: You added the shell project. What is there for us to do here exactly?

Revert the page move mentioned in the task description.

Right, sorry.

@TTO: You added the shell project. What is there for us to do here exactly?

Revert the page move mentioned in the task description.

I believe the Flow team can deal with this tomorrow (~16 hours), if someone else doesn't beforehand.

TTO lowered the priority of this task from Unbreak Now! to High.Jan 23 2015, 9:29 AM
TTO updated the task description. (Show Details)

No longer requires manual DB manipulation, as the article was deleted. It would still be nice to make sure nothing else has gotten moved into Topic space though.

MrStradivarius raised the priority of this task from High to Unbreak Now!.Jan 23 2015, 2:23 PM

I've bumped the priority back up. The urgency of this isn't in fixing the page on enwiki that was moved, but the potential for page-move vandalism on other wikis where Flow is enabled. If we can't roll out a patch for this in the next few hours then someone with global sysop rights should add a temporary edit filter preventing these moves on each affected wiki.

gerritbot added a subscriber: gerritbot.

Change 186351 had a related patch set uploaded (by Matthias Mullie):
Disallow moving in Topic: namespace

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

Patch-For-Review

I like the AbuseFilter that was added as a stopgap, very clever!

Above patch should disallow moving pages into the topic namespace

So far, there haven't been any other similar occurences on any of the wikis that Flow is currently deployed at. I'll check that again once we've deployed this patch, to make sure nothing happens between now & then.

Change 186353 had a related patch set uploaded (by Matthias Mullie):
Disallow moving in Topic: namespace

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

Patch-For-Review

Change 186354 had a related patch set uploaded (by Matthias Mullie):
Disallow moving in Topic: namespace

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

Patch-For-Review

In T87396#990828, @TTO wrote:

No longer requires manual DB manipulation, as the article was deleted. It would still be nice to make sure nothing else has gotten moved into Topic space though.

I think the deleted revisions are in the wrong place, though.

Change 186351 merged by jenkins-bot:
Disallow moving in Topic: namespace

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

Change 186353 merged by jenkins-bot:
Disallow moving in Topic: namespace

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

Change 186354 merged by jenkins-bot:
Disallow moving in Topic: namespace

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

The patch to prevent moves into NS_TOPIC has been deployed to all wikis, we are discussing the best way to put the history of the deleted page back into the main namespace.

When we looked at it this morning, some of the deleted page content was in the right place, but not all. We're working on repairing this right now, so all of the deleted content is in the right place and could (if appropriate) be undeleted normally.

Change 186395 had a related patch set uploaded (by Mattflaschen):
Live hack to allow repair of page in wrong namespace

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

Patch-For-Review

Change 186399 had a related patch set uploaded (by Mattflaschen):
Live hack to allow repair of page in wrong namespace

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

Patch-For-Review

Mattflaschen-WMF closed this task as Resolved.Jan 23 2015, 8:52 PM

The underlying bug is fixed (pages can not be moved to the Topic namespace again). The deleted content from Kuttiattoor Thittayil Sree Daivathar Temple has also now been moved back to the right namespace (and can be undeleted/re-deleted/whatever) normally if needed.

Let us know if you see any other problems.

Change 186395 abandoned by Matthias Mullie:
Live hack to allow repair of page in wrong namespace

Reason:
Killing this patch, it's been executed

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

Change 186399 abandoned by Matthias Mullie:
Live hack to allow repair of page in wrong namespace

Reason:
Killing this patch, it's been executed

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