Show changes in Live preview indicates no changes in a brand new page, data loss results
Open, HighPublic

Description

  1. Enable live preview in Special:Preferences > Editing
  2. Visit new page, click [Create source] to create
  3. Enter lots of text, [Preview] many times
  4. Much later, wonder if you've saved your latest version yet, so click [Show changes]

Result: nothing is displayed, so you assume you've made no changes and quit your browser, and all your work is lost.

Expected result: please please do what regular [Show changes] does and display

  Latest revision       Your text
Line 1: 	    Line 1:
(nothing)           + lots of text
                    + lots more text

so I know that I haven't actually saved the page yet.

Spage updated the task description. (Show Details)
Spage raised the priority of this task from to High.
Spage added a subscriber: Spage.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 15 2015, 4:10 AM
TheDJ added a subscriber: TheDJ.Sep 2 2015, 6:47 AM

Yeah this is a difference in behavior between the api and the edit page.
It mostly has to do with the fact that the diff api is a subpart of the revisions api. And for a new article, there is no revision yet of course...

https://en.wikipedia.org/w/api.php?action=help&modules=query%2Brevisions

TheDJ set Security to None.
Anomie added a subscriber: Anomie.Sep 2 2015, 1:07 PM

TheDJ added a project: MediaWiki-API.

And the API bug here is?

TheDJ added a comment.Sep 2 2015, 9:19 PM

TheDJ added a project: MediaWiki-API.

And the API bug here is?

There is a disjunct between editing page abilities and api abilities. That seems to me like a shared problem, that both tags should get an opportunity to discuss.

Probably the thing to do here is to add fromtext and totext (and possibly frompst and topst) to action=compare.

Change 236078 had a related patch set uploaded (by TheDJ):
[WIP] API: Compare should be able to deal with text

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

Anomie moved this task from Needs Code to In Dev on the MediaWiki-API board.Sep 10 2015, 2:55 PM
Ricordisamoa renamed this task from Show changes in Live preview indicates no changes in a brand new file, data loss results to Show changes in Live preview indicates no changes in a brand new page, data loss results.Mar 31 2016, 2:33 AM
Ricordisamoa added a subscriber: Ricordisamoa.

Change 236078 abandoned by TheDJ:
[WIP] API: Compare should be able to deal with text

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