Page MenuHomePhabricator

REVISIONID won't subst
Closed, ResolvedPublic

Description

Author: random832

Description:
I want to be able to use code like "{{fullurl:{{subst:PAGENAME}}|diff=last&oldid={{subst:REVISIONID}}}}" to generate a diff of the current edit (same edit i enter that code in), but {{SUBST:REVISIONID}} comes up as blank.

See http://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&diff=171246052&oldid=171245824


Version: unspecified
Severity: trivial

Details

Reference
bz11964

Event Timeline

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

random832 wrote:

It's not clear if it should expand to the previous current revision, or the newly-saved one (the code i was trying to use assumes it is the newly-saved one) - maybe different keywords should be used for both.

Fundamentally you can't subst the revision id, as the revision id is not known until after the revision is recorded in the database.

Sorry!

random832 wrote:

What about a way to subst with the _current_ revision id (the one that already exists) - that might make less sense logically, but would allow for what I want to use it for.

Well, that would be pretty horrifyingly ugly IMHO. ;)

An additional problem is that a SUBST'ed revision ID would point to the wrong revision after certain types of operations, such as transferring a page between wikis. Since the correct value may change, subst seems inappropriate even if it did work.

anon.hui wrote:

(In reply to comment #4)

Well, that would be pretty horrifyingly ugly IMHO. ;)

An additional problem is that a SUBST'ed revision ID would point to the wrong
revision after certain types of operations, such as transferring a page between
wikis. Since the correct value may change, subst seems inappropriate even if it
did work.

One may use {{subst:fullurl:...|...{{subst:REVISIONID}}...}} so that the page can be transferred to other wikis.

*** This bug has been marked as a duplicate of bug 6181 ***

anon.hui wrote:

(In reply to comment #5)

One may use {{subst:fullurl:...|...{{subst:REVISIONID}}...}} so that the page
can be transferred to other wikis.

Sorry, I'm wrong.