Page MenuHomePhabricator

Unable to undo or edit previous revision to undo contentmodel change with intermediate edit
Open, MediumPublic

Description

Posted originally at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(proposals) :
Scenario:

User A writes the last good revision to page "Foo".
User B maliciously changes the content model of "Foo" from wikitext to CSS.
User C edits the page in good faith.
User D would like to revert to User A's revision without knowledge of Special:ChangeContentModel. (as not required by the undo/rollback cases tested so far)

Bug: User D is unable to do so.

A page set up with this scenario is at https://test2.wikipedia.org/wiki/Law3 (https://test2.wikipedia.org/w/index.php?title=Law3&oldid=296990)

Event Timeline

Believe not supporting editing a previous revision of in a different contentmodel is problematic and probable on high-traffic mainspace pages. Twinkle's revert to previous revision would break here too, as far as I know.
@Legoktm remarked at VPR that a potential mitigation is a "change tag that indicates the edit changed the content model of the page, which would then link to documentation about changing content models".

Rollback of course doesn't work, because rollback can only be used on edits by the same user. So I'll remove that from the summary.

Legoktm renamed this task from Unable to undo, rollback, or edit previous revision to undo contentmodel change with intermediate edit to Unable to undo or edit previous revision to undo contentmodel change with intermediate edit.Sep 11 2016, 10:40 PM

Page moves have a similar issue, right?

@MZMcBride Similar issue in that undo doesn't work when there's an intermediate edit... but I'd say that in terms of usability, it's not as disruptive, and not being able to undo page moves is well-known. Users are given a "Move" option in the tabs at the top that takes users directly to Special:MovePage, whereas "Change content model" is not an option given (and probably shouldn't be).

I claim that content model changes have the potential to be more disruptive precisely because the option is not given in the UI, and most folks don't know about Special:ChangeContentModel.

Comment: if it's decided that edit-previous-revision cross-contentmodel is to be supported, then non-autoconfirmed users (or whatever the scope of editcontentmodel is) should not be able to edit a revision with a different contentmodel because they don't have the permission.

(Don't know how relevant this is, but today, an IP (or non-autoconfirmed) looks like it can revert to a previous revision that has the same contentmodel as the current even when some intermediate revisions are in a different contentmodel. Looks reasonable)

Change 310224 had a related patch set uploaded (by Legoktm):
Add a change tag for edits that change the content model of a page

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

Change 310224 merged by jenkins-bot:
Add a change tag for edits that change the content model of a page

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

So we now have a change tag in the page history, which should alleviate the discovery problem of finding Special:ChangeContentModel. I would propose that we leave this bug open, but remove it as a blocker of granting editcontentmodel.

@Legoktm I'm a bit new at this, but as the bug filer, solution is fine by me for now. (wonder if tech ambassadors wanted to add anything) Makes sense to continue to track this