Last modified: 2014-11-04 20:23:10 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 T25489, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23489 - Implement ability to get page title of a deleted revision by its rev_id (and use it!)
Implement ability to get page title of a deleted revision by its rev_id (and ...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page deletion (Other open bugs)
unspecified
All All
: Low enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 18104
Blocks: 16659
  Show dependency treegraph
 
Reported: 2010-05-12 15:08 UTC by Alphos
Modified: 2014-11-04 20:23 UTC (History)
6 users (show)

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


Attachments

Description Alphos 2010-05-12 15:08:44 UTC
I'm working on a cross-WMF-wikis spam list with a few stewards, which sadly has a huge data corruption because of the iso-latin the original dev (Beetstra) used in the database instead of a plain UTF8. We've been trying to correct it, but we're hitting a problem when it comes to get the page title of revs that have been deleted : it's impossible. (end of "my life message")

In the user interface, Special:Undelete uses a timestamp instead of a rev id, and requires a page title, and allows to see the contents and comments.

In the API, &list=deletedrevs provides similar information.

The problem is some links are provided with nothing more than a rev_id (especially when shortened, "/wiki/?oldid=12345" for instance)

It should be possible to get the page title and perhaps other properties of a deleted rev by providing only its id.
It could also prove useful to alter Special:Undelete to use revids instead of timestamps, seing as timestamp seem somewhat "messy" (there's always a possibility for two edits to occur in the same second for the same page).
Comment 1 Krinkle 2010-06-03 15:15:49 UTC
This would also help sysops that get a link to a specific revision of deleted page (or a deleted revision) without a &title= in the URL. It's near impossible for that sysop to then restore that revision or page using the GUI.

For example the following URL:
http://commons.wikimedia.org/w/index.php?diff=40130742&oldid=40130724

How would I do that without knowing the title is "Test12" ?

--
Krinkle
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-08-08 17:04:22 UTC
There's no index on ar_rev_id.  If this were added, the bug should be easy to fix.
Comment 3 Krinkle 2010-10-22 15:21:12 UTC
Due to the content being deleted, the page name should only be visible if the current user is a sysop.
In that case the pagetitle can be queried from the 'archive' table by checking with ar_rev_id and/or ar_page_id.

Whenever available the data from where ar_rev_id is "diff" should be gotten, instead of where ar_rev_id equals "oldid", since the page name could've been changed between the two.

Also, a bit, but not much, more complicated would be url's that (only) have "curid" specified.
WHERE ar_page_id=$wgRequest['curid'] ORDER BY ar_timestamp DESC would return the latest known revisio and thus the ar_title.

I'm not sure but I guess the "deletion / protection log" excerpt that is usually shown on deleted pages, can then be shown aswell.

ie. to make 
* http://commons.wikimedia.org/w/index.php?oldid=40130742
* http://commons.wikimedia.org/w/index.php?diff=40130742&oldid=40130724
* http://commons.wikimedia.org/w/index.php?curdid=10536103

all show the same as: http://commons.wikimedia.org/w/index.php?title=Test12 , if the current user has the appropiate undelete-related permissions.
Comment 4 Krinkle 2010-10-22 15:35:15 UTC
Oops, I meant:

http://commons.wikimedia.org/w/index.php?oldid=40130742
the same as: http://commons.wikimedia.org/w/index.php?title=Test12&oldid=40130724 (including the message that "The database did not find the text of a page ...(revision#: 40130724)."

and http://commons.wikimedia.org/w/index.php?curdid=10536103 the same as http://commons.wikimedia.org/w/index.php?title=Test12
Comment 5 Helder 2014-08-27 12:31:25 UTC
See also recent discussion on
https://en.wikipedia.org/wiki/WP:Village_pump_%28technical%29/Archive_129#Special_Diff
Comment 6 Gerrit Notification Bot 2014-10-24 19:19:20 UTC
Change 168646 had a related patch set uploaded by Anomie:
API: Split list=deletedrevs into prop=deletedrevisions and list=alldeletedrevisions

https://gerrit.wikimedia.org/r/168646
Comment 7 Gerrit Notification Bot 2014-11-04 20:22:20 UTC
Change 168646 merged by jenkins-bot:
API: Split list=deletedrevs into prop=deletedrevisions and list=alldeletedrevisions

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

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


Navigation
Links