Page MenuHomePhabricator

Show changes button on edit page does not work when using a non-default format with a content model that supports multiple formats
Closed, ResolvedPublic

Description

Steps to reproduce:

  • Have a content model with multiple formats
  • Edit the page, passing a non-default format with the url parameter &format=foo
  • Hit show changes
  • Expected behaviour: You get a diff
  • Actual behavior: MW seems to try to serialize the contents of the edit box as if they were the default format. This fails. Any subsequent preview/save button presses also fail.

Note that most normal editing/preview etc work fine with non-default format.

Event Timeline

I think this is a result of the side effect of the diff code calling $this->getCurrentContent()

Change 299440 had a related patch set uploaded (by Brian Wolff):
Do not override content format in EditPage when loading rev.

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

Change 299440 merged by jenkins-bot:
Do not override content format in EditPage when loading rev.

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

Bawolff claimed this task.