This is a documentation subpage for Module:Cite IUCN. It may contain usage information, categories and other content that is not part of the original module page. |
This Lua module is used on approximately 62,000 pages and changes may be widely noticed. Test changes in the module's /sandboxor/testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
{{#invoke:Cite IUCN|cite}}
– for {{cite IUCN}}
{{#invoke:Cite IUCN|make_cite_iucn}}
– for {{make cite IUCN}}
Until late 2018, the IUCN assessments used urls of form
http://www.iucnredlist.org/details/15955/0
From around September 2018, the IUCN switched to a new format for the url, of the form
https://www.iucnredlist.org/species/15955/50659951
Shortly afterwards the IUCN produced a backup of the old system with links of the form
http://oldredlist.iucnredlist.org/details/15955/0
A typical IUCN citation, as given on their assessment pages, is now of the form:
e.T15955A50659951
contains the taxon ID (between the T and A) and the assessment ID (after the A). These two identifying numbers are also contained in the doi.When there is an amendment to an assessment, a new assessment number is assigned, which causes a change in the electronic page number and the url of the page.
The behaviour of the doi is unusual. A new assessment does not cause a new doi, it retains the original assessment number. If this is used by a template to construct a url, it will be to the original version of the assessment. However, if the url of the doi is followed, the IUCN doi resolver redirects to the latest assessment. The target of the doi has changed to the revised version of the IUCN assessment. Thus if the template uses the doi url the linked page will change from the one seen by the editor who added the citation.
Therefore this module will create a url with the following order of precedence:
|page=
parameter to generate the url.|id=
to generate the url if it is of the two new-style two part form, i.e. TAXON_ID/ASSESSMENT_ID
(e.g. 15955/50659951
)|doi=
parameter to generate the url. This is last choice because it uses the number of the original assessment even when the assessment has been amended.
When none of the above options are available, and when |url=
has the old form, this module will change the scheme from http://
tohttps://
in an attempt to make a working link (see next section).
There is still a legacy issue with old-style IUCN urls, which are still used in many Wikipedia citations.
Some months after the change to the new-style urls, the IUCN introduced redirects for the old-style urls that link to the appropriate pages addressed by the new style url. In most cases these redirects will work. So the oldstyle url for the tiger https://www.iucnredlist.org/details/15955/0
correctly links to the assessment at https://www.iucnredlist.org/species/15955/50659951
(see tiger).
However, not all assessments redirect. For instance, the oldstyle url for the Bengal mud eel http://www.iucnredlist.org/details/166410/0
links to the home page (see Bengal mud eel).
This failure of some old style url to be redirected is unexpected, as the redirect function of the IUCN API does link to the correct page. A url of the form
https://apiv3.iucnredlist.org/api/v3/taxonredirect/166410
However, redirects are not available when the taxon id has been replaced and an error in JSON format is returned (e.g. for house sparrow).
There is another case where the old style urls gives dead links, when the taxon ID has changed. For instance, the Italian sparrow was split off from the house sparrow as a new species and both assigned new taxon IDs. This left any old style urls to the original assessment as dead links.
http://www.iucnredlist.org/details/149100/0
for house sparrow (dead link on old taxon id 149100
)https://www.iucnredlist.org/species/103818789/155522130
for house sparrow (Passer domesticus), using new taxon id and assessment number 103818789/155522130
.https://www.iucnredlist.org/species/103819014/132196181
for Italian sparrow (Passer italiae), using new taxon id and assessment number 103819014/132196181
.In this case there is no action the template/module can take to resolve the issue. Active intervention of an editor is required.