Last modified: 2014-08-14 22:24:14 UTC
If I go to https://es.m.wikipedia.org/w/index.php?title=Wikipedia:Caf%C3%A9/Archivo/T%C3%A9cnica/Actual&oldid=68583002 there is no way to access source. It would be nice if it was possible.
Prioritization and scheduling of this bug is tracked on Mingle card https://mingle.corp.wikimedia.org/projects/mobile/cards/1252
Would be good to get a version of this in beta.
The related Google Code-in task written by Jon specifies that this is only about viewing source, not saving changes. Why? Reverting vandalism or dummy mistakes is a task that could be perfectly done via mobile, provided a simple way to access the previous version of a poage, the possibility open the editor in an old version, and save it as the new version.
Desktop doesn't allow you to save a revision and in my opinion this is not a good idea. You would not be reverting a revision you would be re-writing the entire content - imagine loading up the first revision of a page and saving that! Adding reversion would be another enhancement request - this is simply about being able to see the underlying wikitext on a page like this: https://en.m.wikipedia.org/w/index.php?title=San_Francisco&oldid=582487722
(In reply to comment #4) > Desktop doesn't allow you to save a revision In Desktop you can open any revision, click "Edit" or "Edit source", and directly save changes. All you get in the way is a warning message: "Warning: You are editing an out-of-date revision of this page. If you save it, any changes made since this revision will be lost." When it comes to deal with vandalism, many times it is not possible to simply "undo". The way for regular editors to solve this is to go to the last valid revision and save it. > imagine loading up the first revision of a page and saving that! If this is wrong, probably a human or a bot will act on it with a simple "undo". I'm only saying that the desktop behavior could be simply replicated in mobile. If you are concerned about extra vandalism caused by this feature, an option could be to start trying with e.g. autoconfirmed users, which are the ones that tend to fix this kind of messes.
One step at a time Quim... :) This bug is simply about exposing the wikitext - a simple baby step in that direction - feel free to raise an enhancement request when we have that to add additional workflows as this would require significantly more work.
Hmm, so from what I can see, Jon's proposal/request: * If oldid parameter is present in the url and edit mode is entered * Display a header at the top saying that the user is viewing an old revision * Display the standard editor <textarea>, but with the disabled attribute (copy and paste/etc still works, just not modifiable) * The text in the textarea will be that of the old revision, obtained by passing the rvstartid parameter in the api request in EditorApi.js * Hide the continue button (and just show the cancel link) For the steps involving disabling the textarea and hiding the "continue", I imagine this should probably be done by adding a new *viewOnly* option to the editor (which in the future could definitely be extended to protected pages and the like, which mirrors behavior on desktop). Have I missed anything?
Pretty much. If oldid is present show a 'view source' link that when clicked loads the existing editing without a save button - user can only exist. I'd use the name readOnly rather than viewOnly. It's worth noting the overlay code is currently being overhauled so this should be restricted to the beta mode of the mobile site (append mobileaction=beta to end of the URL - you will notice the search now says Search <Project> (Beta))
How do I go about restricting it?
Never mind, I believe I see what needs to be done. Thanks! I'll try to have an initial patch for this ready tonight/tomorrow, depending on holiday plans.
Change 103334 had a related patch set uploaded by Theopolisme: View source of old revisions https://gerrit.wikimedia.org/r/103334
Update: Thanks to @Theopolisme we (almost) now have a version of this in beta. It would be good to get some design input so that this can be styled correctly and pushed to stable. When this finally gets merged you'll be able to see this when logged in by going to: http://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Forty-seven_Ronin&oldid=52226&mobileaction=beta Notice the 'view source' link and what happens when you click it.
Change 103334 merged by jenkins-bot: View source of old revisions https://gerrit.wikimedia.org/r/103334
I documented this on https://www.mediawiki.org/wiki/Mobile/Release_history#Beta We will need a design before we can anything further with this.
Please have Kenan prioritize this in the mobile backlog.
Since this is in beta marking as assigned.