Template talk:Oldid

Null edit needed to purge cache
Please perform a null edit. Hey Mid  (contributions) 17:27, 28 September 2010 (UTC)
 * Can you explain why you are requesting a null edit be made? Sounds like a strange request.  Giftiger Wunsch   [TALK]  17:35, 28 September 2010 (UTC)
 * I would like it to appear here, but since I'm not an administrator (wished I was such an user), I can't null edit that page. Hey  Mid  (contributions) 17:38, 28 September 2010 (UTC)
 * OK, we're not starting to do that. Give it time. Amalthea  17:40, 28 September 2010 (UTC)
 * OK. Hey  Mid  (contributions) 17:41, 28 September 2010 (UTC)

Whitespace
produces, with a whitespace at the end (not where the comma is). This also defaults to Main Page, which is not where the link arrives. — HELL KNOWZ  ▎TALK 14:28, 17 March 2012 (UTC)
 * Well, you are omitting required parameters. If you only want to use the revision number, use oldid2, which also doesn't have the whitespace issue: → .  Amalthea  15:21, 17 March 2012 (UTC)
 * I see, didn't realize there was oldid2 for this. I just assumed this one would work since MediaWiki doesn't require ?title= to be set when passing ?oldid= (well, unless the latter is invalid). — HELL KNOWZ  ▎TALK 15:47, 17 March 2012 (UTC)

Revision date
It seems to me that it would be more helpful, when link text isn't specified but an oldid is, for the template to show a revision date before "version" rather than just "old". Is this doable? I played with trying to make it happen in the sandbox (on a local wiki, not here on wikipedia), but couldn't make it work. The #REVISIONDAY and related parser functions are labeled as expensive, so it probably isn't a good idea to even do here on Wikipedia, but I was thinking on our far smaller internal wiki that it wouldn't be a problem. Any thoughts anyone would like to share on the concept? --Salton Finneger (talk) 14:16, 12 November 2013 (UTC)

Protected edit request on 30 December 2013
The ability to link to a specific section of the page whose old version is being retrieved would be very helpful.

APerson (talk!) 03:17, 30 December 2013 (UTC)
 * Pictogram voting question.svg Question:, let's work out the details before reactivating the request for an admin. What exactly do you mean?  You can already add #section_header to the revision number to make it go to a section, no?  Does it need a special section parameter (parameters make things more complicated than they need to be sometimes)? Technical 13 (talk) 13:51, 30 December 2013 (UTC)


 * Whoops&mdash;I didn't realize that exists. Ignore this edit request, please. APerson (talk!) 19:53, 30 December 2013 (UTC)

Bug: use with oldid adds Main Page
When doing this: the URL it generates is: That shouldn't be happening; it should just be The logic is off; it needs to evaluate the parameters in a different order. I'd fix it myself, but looking at that many curly braces makes my eyes go crossed. Anyone? —  Scott  •  talk  14:40, 19 February 2014 (UTC)
 * https://en.wikipedia.org/w/index.php?title=Main_Page&oldid=596184087
 * https://en.wikipedia.org/w/index.php?oldid=596184087
 * This seems to be intended: see above. Having said that, I do think it makes sense to do it in the way you are suggesting. Perhaps oldid and oldid2 could be merged somehow? — Mr. Stradivarius  ♪ talk ♪ 14:11, 22 March 2014 (UTC)
 * The template is functioning as designed. The parameters you have provided to the template are invalid. For what you desire you should use oldid2 not oldid. The oldid template requires that you provide a page name.  If you do not provide a page name it defaults to the Main Page.
 * Personally, I find that the requirement for a page name makes oldid effectively useless. I always use oldid2. oldid has been this way for years. At this point, it is inappropriate to change the functionality of oldid as it could easily break old uses of this template.
 * Multiple templates in the group which provide information similar to oldid have various versions which use parameters in somewhat different configurations. For instance, compare: contribs vs. contribs2 vs. contribs3 and history vs. history2 vs. history3, and diff vs. diff2. &mdash; Makyen (talk) 14:24, 22 March 2014 (UTC)
 * What you just said is basically a giant flashing sign saying "please rationalize this situation". "Breaking old uses" is a non-issue; that can be fixed with a single template that functions correctly, a wrapper or two, and a replacement run with a bot. There's really no logical reason for this template to default to Main Page at all; in fact, it violates the principle of least surprise. A template called "oldid" should provide a MediaWiki parameter called "oldid", a one-to-one mapping. —  Scott  •  talk  14:31, 22 March 2014 (UTC)


 * The template uses fullurl: which requires a page name. An empty fails: . I guess that's why the template arbitrarily chose  when no page parameter is given: . A solution would be to either omit fullurl when no page is given, or find a better non-empty value than Main Page. A little experimentation shows that  works well by producing an empty title parameter:  which links as []. If no problem is found then I suggest to simply replace   by   in   PrimeHunter (talk) 14:46, 22 March 2014 (UTC)
 * I agree that it would be better if it functioned without a page name, similar to how oldid2 functions. My primary issue with making a change here is that the template is used in a significant number of pages of similar historical "value" to: Arbitration Committee Elections December 2008/Voting Process. Frankly, I was not comfortable considering a change without going through and verifying that the resulting link for every use on such pages was actually unchanged. Yeah, we can fairly easily come up with a change that we believe will not affect any current or past use, but how many times have we all had it happen that we just did not think about some corner case? I'm not saying don't do it, just that the level of care should be higher than normal and extra effort should be made to verify that uses in places like evidence provided in old arbcom cases are not altered by any change to the template.
 * From the template history it appears that there was a period where they went back and forth having the Main Page default be in, or out, of the template. Certainly it appears that there were corner cases which were not found until days after an edit was made, and then it was changed/reverted again. If we are going to make this change, it would be beneficial to know why the change was not made at some point in the past.  It is clear from the history that others have had the idea to do so, but that it was ultimately not done.  For that matter, why was oldid2 created rather than integrate the functionality into oldid? &mdash; Makyen (talk) 15:40, 22 March 2014 (UTC)
 * It looks like created it to parallel what was happening with diff2... I guess he thought that a fork was easier. It should be possible to fix this template without changing the behavior of any past usage. I think we would need to:
 * Create a fixed version with a param that generates the current behavior of this template when used without a page name
 * Create a wrapper (oldid-former or something) that passes the parameter
 * Modify the current version to generate a temporary maintenance category for times it's been used without a page name
 * Replace all instances in the maintenance category with calls to the new wrapper
 * Remove the maintenance category part.
 * Does that make sense? —  Scott  •  talk  16:37, 22 March 2014 (UTC)

According to the first bullet point on mw:Manual:Wiki.php, "If the ... oldid parameter is passed, it will override the title if it's not a special page." which tells me that title isn't needed at all for the oldid, so why not just remove "Main page" as a default? fullurl isn't an issue... Simply replace the existing code: with — &#123;&#123;U&#124;Technical 13&#125;&#125; (t • e • c) 16:35, 23 March 2014 (UTC)
 * As has pointed out, a simplistic alteration of the template will damage the historic record. Any behavioral modifications must only apply to future usages of this template. —  Scott  •  talk  17:12, 23 March 2014 (UTC)
 * One alternative is to move the oldid template to a new name (e.g. oldid old version). Then run a bot/AWB task that goes through all the current transclussions (3,397) and change them all to the new name.  Once done, it would be possible to move oldid2, which appears to already do what is desired, to oldid leaving  as a redirect. Alternately, at that point it would be possible to write a new oldid.  If one did not want to put out the effort of a separate task to change the transclussions, it is probably possible to move the page twice, the first time to a page name you don't care about.  Then the bots which correct double redirects would change all of the current transclussions to the new final name. I am assuming the double redirect bots change the transclusions to the new final name, not just one redirect in.  I am currently testing this assumption in my sandbox.  I am also assuming that the bots correcting double redirects fix them in all namespaces. &mdash; Makyen (talk) 01:08, 24 March 2014 (UTC)
 * It appears that the idea of using one of the existing double-redirect bots to perform the changes does not work. As should have been obvious without testing, the bot uses the simpler expedient of changing the first redirect to point to the end page rather than change all the links at the source. I'm not sure why I started thinking down this obviously erroneous path. &mdash; Makyen (talk) 05:02, 24 March 2014 (UTC)
 * These things happen... anyway, your move-botfix-move plan is a good one, it's better than what I came up with. And, after it's done, a new oldid that also produces the behavior of the old version could be written, and oldid old version converted to a wrapper. I guess we should make a bot request, then. —  Scott  •  talk  10:07, 24 March 2014 (UTC)

Template usage not intuitive
Here is what I want

Sunscreen, as it appeared 12:43, 29 October 2016

Here is how I think I should use this template

but using this template in that way generates

and if I want a template which generates a link and name to an older version of an article, I type this

to get this

I do not understand why this template is designed in the way it is. I can use it but it seems weird.  Blue Rasberry  (talk)  17:13, 11 April 2017 (UTC)
 * 1. The intro to the template documentation says: If you only have the revision ID and not the page name, consider using, which requires only the revision ID and can still construct a link.. So instead of, just make it —or better, —and it works:.

2. The beginning of the Usage section shows the template code with parameter names:. So you see where you entered text must be here but it does nothing you were supposed to write the name of the page. Enter and it works:.—Languorrises (talk) 20:05, 11 February 2018 (UTC) ; edited 16:50, 21 February 2018 (UTC)
 * Thanks for the reply, I will look again.  Blue Rasberry   (talk)  16:52, 21 February 2018 (UTC)

"Old"
It's perfectly legitimate to provide a permalink the current version of a page when discussing it as it exists now (but necessarily as it will be when viewing the discussion in the future), right? "Old" is a bit of a misnomer? Maybe I'm overthinking a bit, but I imagine others could do the same. Could this be noted here, just to be clear? Languorrises (talk) 18:04, 11 February 2018 (UTC)

Fix spacing at end of generated label
Please replace with. This change will get rid of the stray trailing space in the preceding sentence. (Unfortunately, the URL https://en.wikipedia.org/w/index.php?title=Special:ComparePages&page1=Template%3AOldid&page2=Template%3AOldid%2Fsandbox&diffmode=source doesn't seem to include any revision IDs so if anything has changed since I wrote this it won't give the correct diff.) &mdash;SamB (talk) 20:13, 10 December 2018 (UTC)
 * Yes check.svg Done. Nice work. Ping me if this broke anything. – Jonesey95 (talk) 20:41, 10 December 2018 (UTC)