Template talk:Dead link
![]() | This template was considered for deletion on 30 August 2024. The result of the discussion was "keep". |
![]() | Template:Dead link is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
|
|
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
permanence
[edit]If a cited url is both dead and previously unarchived, the template documentation says to use |fix-attempted=yes
. That essentially means that the [permanent dead link] is going to stay appended to that source for all time. Is my understanding of that accurate? — Fourthords | =Λ= | 18:52, 22 January 2024 (UTC)
- I believe the intention is that someone may eventually search for a source that can replace the source that has the dead link. pmc (talk) 23:39, 30 March 2025 (UTC)
Subst
[edit]@Primefac, Izno, AP 499D25, HouseBlaster, and Sdkb: After the close of Wikipedia:Templates_for_discussion/Log/2024_August_30, I updated the docs to use subst: Special:Diff/1243135182/1244781426 but the results were unexpected, see the Examples section. This might be because Help:Substitution#Limitation says subst does not work inside ref tags. But that is where this template would most often be used. The TfD was probably closed in unintended error since the agreed solution is not practical? -- GreenC 04:40, 9 September 2024 (UTC)
- Done in by phab:T4700 again. Speaking for myself, I would support reopening the TFD so I can support deleting the template. I wouldn't object to a redirect to {{dead link}}. Best, HouseBlaster (talk • he/they) 04:49, 9 September 2024 (UTC)
- If substing ends up not working out due to technical limitations then I would prefer a deletion of the template rather than redirecting it to Template:Dead link again. Cheers, — AP 499D25 (talk) 05:58, 9 September 2024 (UTC)
- AnomieBOT can subst inside of ref tags, so I just added it to the category directly and will let it handle it. Primefac (talk) 11:54, 9 September 2024 (UTC)
- If substing ends up not working out due to technical limitations then I would prefer a deletion of the template rather than redirecting it to Template:Dead link again. Cheers, — AP 499D25 (talk) 05:58, 9 September 2024 (UTC)
Template-protected edit request on 16 November 2024
[edit]![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Consistency issues
[edit]Change the formatting of the title
attribute to prevent the no-break space from rendering where it is not needed in the hover tooltip. This will fix some style inconsistency between dead links with and without the |title=
parameter specified. To see the issue and my proposed solution, hover the "dead link" cleanup tags.
- The output from the template call
{{dead link|date=April 2025}}
gives: [dead link ]. - This currently renders as: [dead link].
- With fixed spacing, it would render like this: [dead link].
There are some other changes, such as removing the unnecessary <span>...</span>
tag just for white-space: nowrap
, as this can be applied to the <sup>
directly. I have also added the same {{#invoke:Check for unknown parameters|check}} as there is in {{Citation needed}} (modified with the differing template name, of course), though I don't know whether this is needed or wanted.
Outputs
|
---|
The template wikitext below produces the outputs:
{{Fix
| name = {{{name|Dead link}}}
| date = {{{date|}}}
| special = <sup class="noprint Inline-Template" style="white-space: nowrap;">[<i>{{#if: {{{url|}}}|[https://web.archive.org/web/*/{{{url}}} <span title="{{{title|This external link is {{#if:{{{fix-attempted|}}}|permanently }}dead or expired.}}}{{#if:{{{date|}}}| ({{{date}}})}}">dead link</span>]|[[Wikipedia:Link rot|<span title="{{{title|This external link is {{#if:{{{fix-attempted|}}}|permanently }}dead or expired.}}}{{#if:{{{date|}}}| ({{{date}}})}}">{{#if:{{{fix-attempted|}}}|permanent }}dead link</span>]]}}</i>]</sup>
| cat = {{#if:{{{fix-attempted|}}}|[[Category:Articles with permanently dead external links]]|[[Category:All articles with dead external links]]}}
| cat-date = Category:Articles with dead external links
}}
The following is a mock-up of the full wikitext: {{<includeonly>safesubst:</includeonly>#invoke:Unsubst||date=__DATE__ |$B= <!--{{Dead link}} begin-->{{Fix |name = {{{name|Dead link}}} |special = <sup class="noprint Inline-Template" style="white-space: nowrap;">[<i>{{#if: {{{url|}}}|[https://web.archive.org/web/*/{{{url}}} <span title="{{{title|This external link is dead or expired.}}}{{#if:{{{date|}}}| ({{{date}}})}}">dead link</span>]|[[Wikipedia:Link rot|<span title="{{{title|This external link is dead or expired.}}}{{#if:{{{date|}}}| ({{{date}}})}}">{{#if:{{{fix-attempted|}}}|permanent }}dead link</span>]]}}</i>]</sup> |date = {{{date|}}} |cat = {{#if:{{{fix-attempted|}}}|[[Category:Articles with permanently dead external links]]|[[Category:All articles with dead external links]]}} |cat-date = Category:Articles with dead external links }}<!--{{Dead link}} end-->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages containing dead link template with unsupported parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Dead link]] with unknown parameter "_VALUE_"|ignoreblank=y| date | name | reason }}}}<noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE; INTERWIKIS GO TO WIKIDATA, THANK YOU! --> </noinclude> I am not sure if there are other/better ways to simplify this template or reduce any repetition, so any suggested modifications or comments are very much welcome! Regardless of the other changes I propose, the main point for me is to fix the unwanted whitespace issue in the tooltip. |
Thanks in advance! — Thatgaypigeon (talk) 01:12, 17 November 2024 (UTC)
- I'm having difficulty seeing a difference in the above examples with and without the non-breaking space. -- GreenC 01:20, 17 November 2024 (UTC)
- In the first two examples at the top, the "title" attribute in the resulting HTML creates a link tooltip when hovered on desktop. There is currently a redundant (and ugly) additional space at the beginning of the tooltip that is inconsistent with similar templates. To see the difference, you need to hover over the "dead link" text in the examples. :)
- — Thatgaypigeon (talk) 09:57, 7 December 2024 (UTC)
Not done for now: please establish a consensus for this alteration before using the
{{Edit template-protected}}
template. And please place future suggestions of this type in the template's sandbox rather than on the template's talk page. Thank you for your consideration in this matter. P.I. Ellsworth , ed. put'er there 07:06, 17 November 2024 (UTC)- Thanks for the response. I didn't intentionally place the topic on this page, I just used the built-in "Request edit" button, as this is a protected template. (The page message also says "Substantial changes should first be proposed and discussed here on this page.") However, I am not fully familiar with the edit request process. Thanks for linking the corresponding information page for edit requests; I see now I should have merely added the topic instead of requesting an edit. However, I also don't think that my main reason for adjusting the template (removing the unwanted extra space) would be a substantial or controversial change and therefore doesn't need a consensus. The edit request information page states uncontroversial changes "such as correcting typographical errors" don't need to establish a consensus.
- I don't know what the reason is as to why this edit request is denied, unless there is something I'm missing. I believe my edit (at least the main one of removing the extra space) meets all the considerations laid out on that page. Is it merely improper procedure? If so, is there a specific place I should go to propose this change or discuss the topic, or can the discussion be continued here?
- Thanks in advance! :)
- — Thatgaypigeon (talk) 10:15, 7 December 2024 (UTC)
- Thank you for your explanation, editor Thatgaypigeon! This issue is clearer to me now. It seems to be a browser-specific problem, because I checked this in four browsers and saw the different spacing only in FireFox. My Chrome, AOL and Edge browsers do not show any difference when I hover over "dead link" in the above three examples. And sorry, but I do not find the tiny extra space at the beginning in FireFox to be "ugly" – I in fact didn't hardly notice it at all. As for consensus, I'm concerned that while I am not an expert in this type of template, your other proposed changes in addition to the removal of the non-breaking space apparently need discussion before using the {{edit template-protected}} template. This is the talk page for such a discussion, and editors then usually plant neutral pointers on other appropriate talk pages that welcome other editors to this page's discussion. This might seem somewhat of a hassle to you, but we template editors tend to be very careful with templates that are used on so many WP pages. Thanks again! P.I. Ellsworth , ed. put'er there 18:19, 7 December 2024 (UTC)
- I hadn't considered it is a browser-specific issue. I am seeing the space on Firefox too, so your conclusion seems correct. Maybe "ugly" was a strong word, but removing it would be an improvement, albeit one that may go unnoticed for the most part. Consistency and a clean user interface are always nice.
- I also see now how the other changes I proposed would need further review (I am used to working on smaller wikis where these kinds of changes are usually passed through without much issue), and I agree that these changes would need appropriate discussion. I'm not quite so worried about the hassle (in fact, I rather love learning about the inner-workings and procedures of Wikipedia and its content), but rather a bit confused about the preferred approach. What do you suggest I should do? As I say, I didn't manually edit the template into here (I didn't even format it with the 'Outputs' box), I simply used the button at the top of the page, typed in my proposal and submitted. I see now that it added the {{edit template-protected}} template to the page (and I'm assuming that's what notified you). This was not intentional, though perhaps I should have been a little more attentive to what the box at the top suggested.
- Should I create a new discussion topic (without an edit request) for this? Should I submit a new edit request with the sole change of removing the non-breaking space? Should the discussion continue here, if re-opening the edit request to gather consensus is a possibility?
- Thanks again for your feedback and help!
- — Thatgaypigeon (talk) 21:02, 9 December 2024 (UTC)
- Apologies, editor Thatgaypigeon, I subscribed to this section, but I wasn't notified of your post or I would have responded sooner. Another editor pinged me below, and that's how I found out about your post. You can hold further discussion here, or you can find another venue and link to this request to garner consensus for these edits. And that needs to be done before you reopen the edit request. P.I. Ellsworth , ed. put'er there 22:39, 2 April 2025 (UTC)
- Thank you for your explanation, editor Thatgaypigeon! This issue is clearer to me now. It seems to be a browser-specific problem, because I checked this in four browsers and saw the different spacing only in FireFox. My Chrome, AOL and Edge browsers do not show any difference when I hover over "dead link" in the above three examples. And sorry, but I do not find the tiny extra space at the beginning in FireFox to be "ugly" – I in fact didn't hardly notice it at all. As for consensus, I'm concerned that while I am not an expert in this type of template, your other proposed changes in addition to the removal of the non-breaking space apparently need discussion before using the {{edit template-protected}} template. This is the talk page for such a discussion, and editors then usually plant neutral pointers on other appropriate talk pages that welcome other editors to this page's discussion. This might seem somewhat of a hassle to you, but we template editors tend to be very careful with templates that are used on so many WP pages. Thanks again! P.I. Ellsworth , ed. put'er there 18:19, 7 December 2024 (UTC)
Space before closing square bracket
[edit]@Paine Ellsworth: I'm spotting a weird space in the output of this template—right before the closing square bracket. I'm not sure I follow the above discussion, but it does look like something that was introduced in your edit from that timeframe. Would you be able to explain the reason for the space more simply? My concern is that it looks asymmetrical, and also inconsistent with similar inline templates such as {{Citation needed}}:
- Dead link.[dead link ]
- Citation needed.[citation needed]
- Title missing.[title missing]
— voidxor 18:38, 2 April 2025 (UTC)
- Yes, hi editor voidxor, and thank you for pinging me! I used template {{px2}}, a two-pixel template to slightly increase the gap between the letter k and the closing square bracket. There is a table in the documentation of template {{Hair space}} that explains the spacing templates in detail. When italics are used, as in [dead link], final letter is often too close to the next symbol. Compare with [dead link ] (
[''dead link''{{px2}}]
). P.I. Ellsworth , ed. put'er there 22:26, 2 April 2025 (UTC)- @Paine Ellsworth: Thank you for the explanation. It always looked fine on the Chromium-based browsers I use; now it looks a little weird. From the above conversation I take it certain browsers (Firefox?) or fonts were less well behaved, hence the workaround.
- I don't see anything on the documentation of {{Hair space}} about the letter k. Would a hair space (
{{Px1}}
instead of{{Px2}}
) work? — voidxor 13:53, 3 April 2025 (UTC)- The problem with workarounds like this is that they make all sorts of assumptions about the other person's user interface. Many things can affect it: operating system; browser; installed fonts (in either the OS, browser or both); browser font settings like kerning or aliasing; browser zoom setting; Wikipedia skin; style sheets; etc. etc. Basically: if one person percieves the two characters k] as having been run together, that doesn't necessarily mean that everybody else will as well. --Redrose64 🌹 (talk) 14:34, 3 April 2025 (UTC)
- On my screen [dead link] (no space) the bracket sort of looks like a "J", because the top-left of the bracket touches the italic K top-right. It causes a minute nearly imperceptible double-take, like my eyes are playing tricks, though one I could get used to. I think the 2px improves, but this appears to be a subjective matter. With
{{Px1}}
[dead link ] that also works to separate the characters. -- GreenC 15:17, 3 April 2025 (UTC)