Last modified: 2014-08-14 22:24:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56484, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54484 - Feature request: Cannot view source of old revisions
Feature request: Cannot view source of old revisions
Status: ASSIGNED
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Moiz Syed
http://www.google-melange.com/gci/tas...
: design
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-23 21:47 UTC by Jon
Modified: 2014-08-14 22:24 UTC (History)
13 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2013-09-23 21:47:32 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.
Comment 1 Bingle 2013-09-23 21:50:13 UTC
Prioritization and scheduling of this bug is tracked on Mingle card https://mingle.corp.wikimedia.org/projects/mobile/cards/1252
Comment 2 Jon 2013-12-11 20:58:25 UTC
Would be good to get a version of this in beta.
Comment 3 Quim Gil 2013-12-15 07:41:09 UTC
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.
Comment 4 Jon 2013-12-16 18:24:03 UTC
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
Comment 5 Quim Gil 2013-12-16 18:36:10 UTC
(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.
Comment 6 Jon 2013-12-16 18:57:15 UTC
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.
Comment 7 Theopolisme 2013-12-21 06:35:10 UTC
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?
Comment 8 Jon 2013-12-22 19:15:34 UTC
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))
Comment 9 Theopolisme 2013-12-22 21:13:09 UTC
How do I go about restricting it?
Comment 10 Theopolisme 2013-12-22 21:28:30 UTC
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.
Comment 11 Gerrit Notification Bot 2013-12-23 01:44:05 UTC
Change 103334 had a related patch set uploaded by Theopolisme:
View source of old revisions

https://gerrit.wikimedia.org/r/103334
Comment 12 Jon 2013-12-23 19:57:35 UTC
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.
Comment 13 Gerrit Notification Bot 2013-12-23 20:04:39 UTC
Change 103334 merged by jenkins-bot:
View source of old revisions

https://gerrit.wikimedia.org/r/103334
Comment 14 Jon 2014-01-07 21:21:13 UTC
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.
Comment 15 Jared Zimmerman (WMF) 2014-01-08 00:45:00 UTC
Please have Kenan prioritize this in the mobile backlog.
Comment 16 Jon 2014-04-18 17:37:14 UTC
Since this is in beta marking as assigned.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links