Jump to content

Template talk:Oldid

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Oldid/doc)

Null edit needed to purge cache

[edit]

Please perform a null edit. HeyMid (contributions) 17:27, 28 September 2010 (UTC)[reply]

Can you explain why you are requesting a null edit be made? Sounds like a strange request. GiftigerWunsch [TALK] 17:35, 28 September 2010 (UTC)[reply]
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. HeyMid (contributions) 17:38, 28 September 2010 (UTC)[reply]
OK, we're not starting to do that. Give it time. Amalthea 17:40, 28 September 2010 (UTC)[reply]
OK. HeyMid (contributions) 17:41, 28 September 2010 (UTC)[reply]

Whitespace

[edit]

{{oldid|2=273859626}} produces Old revision of a page, with a whitespace at the end (not where the comma is). This also defaults to Main Page, which is not where the link arrives. —  HELLKNOWZ  ▎TALK 14:28, 17 March 2012 (UTC)[reply]

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: {{oldid2|273859626}}[1]. Amalthea 15:21, 17 March 2012 (UTC)[reply]
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). —  HELLKNOWZ  ▎TALK 15:47, 17 March 2012 (UTC)[reply]

Revision date

[edit]

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)[reply]

Protected edit request on 30 December 2013

[edit]

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)[reply]

Question: APerson, 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)[reply]
Whoops—I didn't realize that {{Oldid2}} exists. Ignore this edit request, please. APerson (talk!) 19:53, 30 December 2013 (UTC)[reply]

Bug: use with |oldid= adds |title=Main Page

[edit]

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)[reply]

This seems to be intended: see #Whitespace 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)[reply]
(edit conflict) 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}}. — Makyen (talk) 14:24, 22 March 2014 (UTC)[reply]
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)[reply]
The template uses fullurl: which requires a page name. An empty {{fullurl:|oldid=596184087}} fails: https://wiki.riteme.site/wiki/Template_talk:Oldid. I guess that's why the template arbitrarily chose {{fullurl:Main Page|oldid=596184087}} when no page parameter is given: //wiki.riteme.site/w/index.php?title=Main_Page&oldid=596184087. 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 {{fullurl:#|oldid=596184087}} works well by producing an empty title parameter: //wiki.riteme.site/w/index.php?title=&oldid=596184087 which links as [2]. If no problem is found then I suggest to simply replace Main Page by # in {{fullurl:{{{page|{{{1|Main Page}}}}}}|oldid=... PrimeHunter (talk) 14:46, 22 March 2014 (UTC)[reply]
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: Wikipedia: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}}? — Makyen (talk) 15:40, 22 March 2014 (UTC)[reply]
It looks like Amalthea 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:
  1. Create a fixed version with a param that generates the current behavior of this template when used without a page name
  2. Create a wrapper ({{oldid-former}} or something) that passes the parameter
  3. Modify the current version to generate a temporary maintenance category for times it's been used without a page name
  4. Replace all instances in the maintenance category with calls to the new wrapper
  5. Remove the maintenance category part.
Does that make sense? — Scott talk 16:37, 22 March 2014 (UTC)[reply]

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:

<span class="plainlinks">[{{fullurl:{{{page|{{{1|Main Page}}}}}}|oldid={{{oldid|{{{2|}}}}}}}} {{{label|{{{title|{{{3|{{#if:{{{oldid|{{{2|}}}}}}|Old revision|Current version}} of''' {{{page|{{{1|'''a page'''}}}}}} '''}}}}}}}}}]</span><noinclude>
{{documentation}}
</noinclude>

with

<span class="plainlinks">[{{SERVER}}{{SCRIPTPATH}}/index.php?oldid={{{oldid|{{{2|}}}}}} {{{label|{{{title|{{{3|{{#if:{{{oldid|{{{2|}}}}}}|Old revision|Current version}} of''' {{{page|{{{1|'''a page'''}}}}}} '''}}}}}}}}}]</span><noinclude>
{{documentation}}
</noinclude>

{{U|Technical 13}} (tec) 16:35, 23 March 2014 (UTC)[reply]

As Makyen 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)[reply]
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 [3] 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. — Makyen (talk) 01:08, 24 March 2014 (UTC)[reply]
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. — Makyen (talk) 05:02, 24 March 2014 (UTC)[reply]
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)[reply]

Template usage not intuitive

[edit]

Here is what I want

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

Here is how I think I should use this template

{{oldid|746770315}}

but using this template in that way generates

Current version of 746770315

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

{{oldid|text must be here but it does nothing|746770315|Sunscreen, as it appeared 12:43, 29 October 2016}}

to get this

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

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)[reply]

@Bluerasberry:
  1. The intro to the template documentation says: If you only have the revision ID and not the page name, consider using {{oldid2}}, which requires only the revision ID and can still construct a link.. So instead of {{oldid|746770315}}, just make it {{oldid2|746770315}}—or better, {{oldid2|746770315|some text to show}}—and it works: some text to show.
  2. The beginning of the Usage section shows the template code with parameter names: {{oldid|page|oldid|label}}. 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 {{oldid|Sunscreen|746770315|Sunscreen, as it appeared 12:43, 29 October 2016}} and it works: Sunscreen, as it appeared 12:43, 29 October 2016.
Languorrises (talk) 20:05, 11 February 2018 (UTC); edited 16:50, 21 February 2018 (UTC)[reply]
@Languorrises: Thanks for the reply, I will look again. Blue Rasberry (talk) 16:52, 21 February 2018 (UTC)[reply]

"Old"

[edit]

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)[reply]

Fix spacing at end of generated label

[edit]

Please replace Old revision of Template:Oldid with Old revision of Template:Oldid/sandbox. This change will get rid of the stray trailing space in the preceding sentence. (Unfortunately, the URL https://wiki.riteme.site/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.) —SamB (talk) 20:13, 10 December 2018 (UTC)[reply]

 Done. Nice work. Ping me if this broke anything. – Jonesey95 (talk) 20:41, 10 December 2018 (UTC)[reply]