Page MenuHomePhabricator

Assign lasting ID to latest revision of articles
Closed, ResolvedPublic


Author: leercontainer-bugzilla

This was first requested by Jens Ropers on the wikitech mailinglist, see
supplied URL.

The newest revision of an article should have a unique ID for exactly that
revision to be linkable.

This is very useful because:

  • Linking to wiki articles is "safer" because the linker know exactly which

revision of the article he is linking to, he / she does not have to fear that
the newest revision reads something like "Justin Hartlake sucks
dick!!!!!!!!!!!!!!". This would also make it much easier/safer to cite from

  • Linking to the latest diff is possible, which can be used in discussions where

you'd like to explain why a the diff was done. Such a diff link could also
replace/join the "(hist)" link on "User contributions" pages, making those much
more useful. If used on the Watchlist you would also come to the correct diff if
an article has been changed in the time between loading the watchlist and
loading the diff.

I don't know how it can be implemented but:

  • The first "(last)" diff link and all the "(cur)" links on the "History" page

should link to a diff page that is the same no matter how many revisions are
done after loading the "History" page.

  • A "particular revision" link should be added to the article (and discussion)

page somewhere. I suggest this text "This is the link to this particular
revision of this page" or it could have its own small box under "other
languages", or it could be placed somewhere on the history page.

  • When an older revision than the current is accessed without going through the

history page, a more explanatory header than the current "(Revision as of 05:47,
20 Aug 2004)" (example) should probably appear. Something like "This is the
revision as of hh:mm, dd Mmm yyyy. It has since been [[link to
history|revised]], the newest revision is available [[ordinary wikilink|here]].
'''You''' can also [[edit]] it."

Version: unspecified
Severity: enhancement



Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:47 PM
bzimport set Reference to bz181.
bzimport added a subscriber: Unknown Object (MLST).

leercontainer-bugzilla wrote:

While I have only requested that the newest revision has its own *ID* (like the
oldid), another feature that has been requested and perhaps could be implemented
at the same time is *revision numbering*. It would indeed be ideal if one could
refer to article revision numbers e.g. the current revision (17:50, 13 Aug 2004)
of [[BugZilla]] is 14. Simple revision numbering could be a "easy"(?) partial
solution to this "bug".

Per-article revision numbers would require a schema change (and thus long downtime on Wikipedia). It's also not clear to me
how such numbers should behave across eg deletion/undeletion.

rowan.collins wrote:

I don't think per-article revision numbering would make much odds, but
pre-assigning an oldid for the latest revision would certainly make some
features a lot more useful: currently you can't refer to a diff, or a dated
version, until the page has been changed again. You can of course find a trivial
change to make, or vandalise and revert yourself, but this is a rather
cumbersome and hackish workaround.

This would also gel nicely with a solution to bug 268 (short-hand links to a
particular revision) since it could be made very clear how to link to a
particular revision.

jeluf wrote:

The triple (cur_id, timestamp, hash(text)) should provide a unique number.
Encoded in base 36 (0-9,1-z) this is about 15 characters, using crc32 as hash.

In the unlikely case that this is not unique, the alternatives should be listed.
The reader might easily notice that "Justin Hartlake sucks dick!!!!!!!!!!!!!!"
is not the revision that was referred to:

"There are two revisions matching your article key:

  • 2004, May 05, 21:34 maveric (reverted vandalism)
  • 2004, May 05, 21:34 (Hahahahahah!!!!)"

leercontainer-bugzilla wrote:

(In reply to comment #4)

Looks like an ok solution to me, and it is _very very unlikely_ that the unique
number is not unique, right? What is the right revision might not always be as
obvious as in the stated example.

leercontainer-bugzilla wrote:

(In reply to comment #4)

But if a database redesign will implement a more well-designed solution, it
would not be wise to first make one kind of unique link, and then replace it
with another, rendering the old defunct.

SCHEMA_WORK branch implements this, should be merged into 1.4 if things are
going well.

rowan.collins wrote:

*** Bug 1052 has been marked as a duplicate of this bug. ***

bugzillas+padREMOVETHISdu wrote:

Workarounds in MediaWiki 1.4 (Not sure if I'm too late to find & say this, e.g.
because the bug has already been fixed):

Permanent link to currently latest version (clv):<oldid
of version just prior to clv>

Permanent link to diff between the version just prior to clv and clv:<oldid
of version just prior to clv>

Permanent link to diff between some other version and clv:
<no workarounds>

I think the method with "next" should be used for the links on history pages.
Although it is kind of workaround, I think it would be more useful than the
current behaviour.
(What I mean is something like this, although this is just a patch:)

  • ..\orig\PageHistory.php 2004-11-25 14:41:34.000000000 +0100

+++ PageHistory.php 2005-02-25 10:40:57.234808500 +0100
@@ -155,7 +155,7 @@

		if ( $oid && $this->lastline ) {
			$ret = preg_replace( "/!OLDID!([0-9]+)!/", $this->mSkin->makeKnownLinkObj(
  • $this->mTitle, $message['last'], "diff=\\1&oldid={$oid}",'' ,'' ,' tabindex="'.$counter.'"' ), $this->lastline );

+ $this->mTitle, $message['last'], "&diff=next&oldid={$oid}",'' ,'' ,' tabindex="'.$counter.'"' ), $this->lastline );

		} else {
			$ret = '';

artslave wrote:

Would be useful if this version ID number could be stored in a variable too -- {{VERSIONNUMBER}} or the
like -- a la the other variables at This would make it easy
to construct templates for citation of the current version (see bug 800), and other references helpful to
readers as well as editors.

Closing as FIXED. Revision ID for all revisions already implemented in 1.5 in HEAD.

Making it available as a variable might be useful; please file a separate bug for it.

zigger wrote:

*** Bug 165 has been marked as a duplicate of this bug. ***