Template talk:Diff

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Contents

[edit] Sandbox and test cases

This template now has a sandbox and test cases. If you edit this page, please verify that the test cases still work. See Wikipedia:Template test cases for more information.

[edit] Problems with the current version

I initialised the sandbox with an old (believed to be working) version of the template. Right now, the code in the sandbox (derived from revision 208569499 of the template) works, and the code in the main template (as of revision 209445661) is wrong in the following ways:

  1. It gets the URLs slightly wrong (e.g. "Main+Page" instead of "Main_Page");
  2. It makes the links look like external links, whereas they should look like internal links.

AlanBarrett 15:00, 1 May 2008 (UTC)

I'm going to go ahead and Be Bold. The sandbox version seems to work fine, I'm going to move it to the main template page. Feel free to revert if it doesn't work out and if you have time, contact me about it. (its also a much simpler implementation of template syntax)  Atyndall93 | talk  12:35, 4 May 2008 (UTC)

[edit] {{oldid}}

Hi guys; I added Template:Oldid to cover the situation of linking to an old version; it seemed like I was doing that all the time and could never remember where the blank parameter in {{diff}} went! :-) I reused the code from {{diff}} rather than transcluding it through. --tiny plastic Grey Knight 14:40, 17 July 2008 (UTC)

[edit] Adding new categories

{{adminhelpme}}

Apparently adding new categories to this template's sub-page doesn't work for some reason. I added Category:Diff templates but it won't show up, even after purging both pages, including the category page itself. Why? HeyMid (contributions) 16:03, 26 September 2010 (UTC)

Sometimes you need to add them to the main template, in the no-include section where {{documentation}} resides, or make sure you hit purge on the documentation page. Unless you mean a different subpage, if so left us know. I hope this helps. --WolfnixTalk • 16:12, 26 September 2010 (UTC)
Also, In the docs section make sure it is in the includeonly section. --WolfnixTalk • 16:14, 26 September 2010 (UTC)
But why is it like this in this template? I tried adding it to Template:Diff/doc and purged all related pages, but it still won't show up. What makes this template different from others then? HeyMid (contributions) 16:17, 26 September 2010 (UTC)
Yes, I have already checked that. Also, I have the same problem with Template:Oldid. HeyMid (contributions) 16:22, 26 September 2010 (UTC)
Shows for me. Amalthea 16:29, 26 September 2010 (UTC)
Yes, it shows up on the main page, but when you click on the actual category, it doesn't show up there. HeyMid (contributions) 16:34, 26 September 2010 (UTC)
Oh, in the category? That's a Mediawiki thing, just wait until the job queue gets around to it (or someone (null) edits the page). See Help:Category#Adding a category by using a template. Amalthea 16:40, 26 September 2010 (UTC)
This seems to only affect sysop-protected templates; the non-protected ones show up immediately. And because of this, I am unable to null edit these pages. HeyMid (contributions) 16:43, 26 September 2010 (UTC)
No, that impression is incorrect. Amalthea 16:50, 26 September 2010 (UTC)
My impression is that you null-edited this page. I was forced to do so at Template:Diff2 for making it appear in Category:Internal link templates. Or I need more patience. HeyMid (contributions) 17:01, 26 September 2010 (UTC)
That impression is correct. ;)
And yes, jobs can take hours or days sometimes to get processed (and sometimes, in the past at least, were dropped entirely). Amalthea 17:09, 26 September 2010 (UTC)

[edit] Edit request: remove extra ampersand

{{edit protected}}

See my edit to Template:diff/sandbox. Please remove the ampersand from the first "&diff", following "fullurl:" (but not the other "&diff" following "index.php"). Just fixes a minor eyesore in the URL:

http://en.wikipedia.org/w/index.php?title=Main_Page&&diff=prev&oldid=204901573: Before
http://en.wikipedia.org/w/index.php?title=Main_Page&diff=prev&oldid=204901573: After

Vadmium (talk) 10:59, 24 February 2011 (UTC)

Good job. YesY Done — Martin (MSGJ · talk) 11:35, 24 February 2011 (UTC)

[edit] Why the title parameter?

Is there any good reason why this template wants the page title as its first parameter? The "title=" part in a diff link or a link to an old version is simply ignored. You can even compare two specific versions of two completely different pages with a diff link. Is there any reason not to propose in the documentation that the first parameter be left empty for simplicity? Hans Adler 08:48, 24 April 2011 (UTC)

I've wondered that too, it seams the Wiki servers don't look at the title, just the diff numbers. 117Avenue (talk) 20:37, 24 April 2011 (UTC)
The title appears on top of the diff screen. Edokter (talk) — 00:13, 25 April 2011 (UTC)
No it doesn't. 117Avenue (talk) 01:29, 25 April 2011 (UTC)
The Main Page being the only exception (as javascript hides it). Edokter (talk) — 12:10, 25 April 2011 (UTC)
Nope, still only seeing the title parameter in the url. 117Avenue (talk) 17:44, 25 April 2011 (UTC)
Indeed the title is no longer required, but some scripts still depend on it being present (but most have since been updated as well). The documentation needs to be updated to reflect that the title is no longer mandatory. Edokter (talk) — 01:15, 26 April 2011 (UTC)

[edit] Edit request: remove the other extra ampersand

Another cosmetic fix similar to the one above, please see my edit to the sandbox. This removes the extra ampersand in the event that a page name is passed without a diff (i.e., it's being used like {{oldid}}). RobinHood70 talk 22:26, 26 July 2011 (UTC)

Yes check.svg Done Dabomb87 (talk) 15:25, 30 July 2011 (UTC)
Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox