Template:Article history
![]() | This template uses Lua: |
This template combines all the "content milestone"-related templates into one, to reduce clutter on talk pages, and make it less confusing when an article has been promoted to the main page Featured Showcase, listed at Articles for Deletion, and/or had Peer reviews. If the article is moved, the actions within the milestones do not usually need to also be moved; the template tacks the milestone actions for an article through article moves and name changes.
The parameter |currentstatus=
controls what text appears at the top of the box, a set of up to twenty parameters of the form |action1=|action1date=|action1link=|action1result=|action1oldid=
produces a row in the history section at the bottom of the box. Action1 refers to the earliest event.
Syntax
Note: DO NOT put HTML comments inside this template.
A simple use would typically include:
{{Article history | action1 = | action1date = | action1link = | action1result = | action1oldid = | currentstatus = }}
More complex uses might include other fields:
{{Article history | action1 = | action1date = | action1link = | action1result = | action1oldid = | action2 = | action2date = | action2link = | action2result = | action2oldid = | currentstatus = | fsnom = | erbdate = | fsdate = | topic = | collapse = }}
Most syntax errors place the talk page in Category:Article history templates with errors. After adding Article history or adding/removing a milestone, please check the bottom of the talk page for this error category.
How to find and use oldid
The "oldid" is a several-digit number which refers to the exact version of the page at the time of that particular action. This version can then be viewed when a user clicks on the date in the list of milestones. If the oldid is not provided, a bot can determine it from the action date.
There are multiple ways to obtain an oldid. For example, while looking at a page's history, it should be possible to hover the mouse over the date of a particular change, and then the URL will appear at the bottom of the window in the browser's status bar:
http://en.wikipedia.org/w/index.php?title=Main_Page&oldid=89723590
In the above example, the final number, 89723590 is what should be used in the oldid field.
This number can also be obtained by stepping through the diffs in an article's history, and looking for the oldid in the URL line.
Errors
This template can produce a number of errors. These are categorised into Category:Article history templates with errors. Explanation of individual errors is given below.
Invalid date
- invalid date 'abc' detected in parameter 'action4date'
This error occurs when a date is specified, but the date isn't recognized as being valid. If in doubt, use the format "d Month YYYY" (for example, "4 June 2010"). If the date looks correct to you, but you still get this error, you might have inserted an invisible control character at the beginning or end of the date. This can happen when you copy and paste a timestamp. Try pressing backspace after you've pasted; if you hit backspace but the cursor doesn't move, you just deleted a control character.
The date recognition in the template relies on the #time parser function, so for all the technical details of what is allowed see the #time documentation on mediawiki.org.
No date parameter
- an argument starting with 'abc2' was detected, but no 'abc2date' parameter was specified
- no date specified for action 3; please add a date to parameter 'action3date' or remove the other parameters beginning with 'action3'
When certain parameter prefixes are followed by a number, e.g. "action4", "dyk2" or "otd3", a date parameter must also be specified, e.g. "action4date", "dyk2date" or "otd3date". This works for parameter names like "action4x", "dyk2abc" and "otd3blah" as well. If you get this error, then you must provide the correct date parameter, or remove all the other parameters with that prefix.
Invalid status
- 'abc' is not a valid status code
This error occurs if you specify a current status with the |currentstatus=
parameter, but the status code that you used was not recognized by the template. See above for a list of valid status codes.
Missing icon
- notice bar icon config set to 'true' but no image could be found
This is an error in the module configuration. Please notify the maintainer at Template talk:Article history.
Action codes
- no action code found in the 'action3' parameter; please add a code or remove other parameters starting with 'action3'
- invalid action code 'abc' passed to the 'action2' parameter
Every action needs an action code for the template to know what the valid results are, what the default link label should be, and other things. For example, for a featured article candidacy the action code is "FAC", and for peer review the action code is "PR". These codes go in the parameters "action1", "action2", "action3", etc. If you include a parameter like "action3result" but don't include an "action3" parameter, or if you include an action code that isn't recognized, you get one of these errors. To fix them, check the spelling of your parameters, check that you have an action code for every action that you have included, and check the list of valid action codes above to see that you have the right one.
No actions
- a current status was supplied without any actions
Article history templates where a current status is supplied must also have actions supplied. This is because for an article to have a current status in the first place, some kind of action must have occurred for it to reach that status. To fix this error, either add the appropriate actions, or if the article does not have a current status, remove the |currentstatus=
parameter.
Action results
- the 'FTC' action requires a result code; please add a result code to parameter 'action3result'
- invalid result 'abc' for action 'GAN' detected in parameter 'action4result'
Most actions (but not all) require a result code. For example, the "FAC" action has two possible results, "promoted" and "failed". Please see the table of actions and results above for valid values. If you fail to specify a result parameter for an action that requires it, or if you specify an invalid result code, then you will get one of these errors. You may also get this error if you supplied an action parameter such as "action1", "action2" etc. by mistake: if this is the case, just remove the parameter.
Invalid oldid
- invalid oldid 'abc' detected in parameter 'action2oldid'; if an oldid is specified it must be a positive integer
It is optional, but recommended, to specify an oldid for all of the actions in the template. This is done by using the parameters "action1oldid", "action2oldid", etc. If any of these values is not a number, or if that number is zero or lower, or is not a whole number, then you will get this error. To fix it, either specify a valid oldid or remove the parameter.
Tracking categories
Deprecated parameters are tracked in Category:Article history templates with deprecated parameters.
See also
- Template:Project banner shell - For combining and collapsing multiple Project banners