MediaWiki talk:Linkshere

Latest comment: 3 months ago by Xaosflux in topic Stray whitespace after latest edit

Meta | Commons | Wikibooks | Wikiquote | Wikisource | Wiktionary | Wikivoyage | Wikidata | Deutsch | Français | Nederlands

This message on this site, depending on the user-specified interface language:

    en (English):

The following pages link to $2


  • af (Afrikaans / Afrikaans): Die volgende bladsye skakel na $2:
  • ar (Arabic / العربية): الصفحات التالية تصل إلى $2:
  • bg (Bulgarian / Български): Следните страници сочат към $2:
  • bn (Bengali / বাংলা): নিচের পাতাসমূহ $2 পাতায় সংযুক্ত আছে:
  • da (Danish / Dansk): De følgende sider henviser til $2:
  • de (German / Deutsch): Die folgenden Seiten verlinken auf $2:
  • eo (Esperanto / Esperanto): La jenaj paĝoj ligas al $2:
  • es (Spanish / Español): Las siguientes páginas enlazan a $2:
  • eu (Basque / Euskara): «$2» orriranzko esteka dute dute hauek:
  • fr (French / Français): Les pages ci-dessous contiennent un lien vers $2 :
  • fy (West Frisian / Frysk): De neikommende siden ferwize nei $2:
  • it (Italian / Italiano): Le seguenti pagine contengono dei collegamenti a $2:
  • la (Latin / Latina): Paginae sequentes ad $2 nectunt:
  • li (Limburgian / Limburgs): De volgende pagina's verwieze nao $2:
  • nl (Dutch / Nederlands): De volgende pagina's verwijzen naar $2:
  • no (Norwegian / ‪Norsk (bokmål)‬): The following pages link to $2:
  • pl (Polish / Polski): Następujące strony odwołują się do $2:
  • pt (Portuguese / Português): As seguintes páginas têm hiperligações para $2:
  • ru (Russian / Русский): Следующие страницы ссылаются на $2:
  • sv (Swedish / Svenska): Följande sidor länkar till $1:

Pages in the MediaWiki namespace regarding this message

Protected edit request on 22 September 2020 edit

Show the "Transclusion count" link for subpages of User:UBX (which are de facto templates - userboxes).

Updated code is in User:ProcrastinatingReader/sandbox3. I can't test it, so can't be sure it works. Basically just adds:

|{{#ifeq:{{ROOTPAGENAME}}|UBX|2|999}}

explanation: adds userspace 2 to accepted list if the rootpagename is UBX, otherwise uses '999' as a random invalid namespace (not 100% sure that part is required, verses an empty string). ProcrastinatingReader (talk) 01:42, 22 September 2020 (UTC)Reply

I think I'd prefer to just rip out all of that logic and show the transclusion count for all pages, since anything can be transcluded. Any objections to that? Jackmcbarn (talk) 21:13, 24 September 2020 (UTC)Reply
That seems fine to me. Seen a few cases where even articles are transcluded (eg 2020–21 Premier League), so seems reasonable. ProcrastinatingReader (talk) 12:45, 25 September 2020 (UTC)Reply
  Done Jackmcbarn (talk) 13:39, 25 September 2020 (UTC)Reply
Thanks Jack! ProcrastinatingReader (talk) 13:53, 25 September 2020 (UTC)Reply

Protected edit request on 9 October 2020 edit

The "Show redirects only" link was removed this summer since the tool had stopped functioning. It turns out that it's still possible to only show redirects, but that it is so non-obvious that no normal user could be expected to figure it out.

I want to suggest that we implement Ahecht's proposed solution from a few years back and add the button in again on the form:

<span class="plainlinks">[{{fullurl:Special:WhatLinksHere/{{FULLPAGENAMEE:$1}}|hidetrans=1&hidelinks=1}} Show redirects only]</span>

Thjarkur (talk) 20:24, 9 October 2020 (UTC)Reply

@Þjarkur: I disagree that it's "so non-obvious that no normal user could be expected to figure it out", so this seems redundant to me, but I'll leave this active in case another admin has a different opinion. Jackmcbarn (talk) 20:30, 9 October 2020 (UTC)Reply
What precipitated this request was this discussion at the Help Desk, both me and DuncanHill have spent a few months now without having been able to figure this out on our own. "Hide links" does not do what I assumed it would, since redirects "link" to pages. – Thjarkur (talk) 20:38, 9 October 2020 (UTC)Reply
Although, as a non-admin, my opinion is apparently not worth considering according to Jackmcbarn above, I strongly support this as the workaround is profoundly non-obvious. Perhaps I'm abnormal. DuncanHill (talk) 20:39, 9 October 2020 (UTC)Reply
I think Jackmcbarn was referring to "if another admin sees this and decides to implement this" – Thjarkur (talk) 21:00, 9 October 2020 (UTC)Reply
What Þjarkur said. I definitely didn't mean that non-admins' opinions aren't worth considering. Jackmcbarn (talk) 21:30, 9 October 2020 (UTC)Reply
I am glad to hear it, thank you. DuncanHill (talk) 01:58, 10 October 2020 (UTC)Reply
Where do you want it? Before or after the "external tool"? — Martin (MSGJ · talk) 22:36, 10 October 2020 (UTC)Reply
I haven't got "external tool" on what links here. It could go after the filters. DuncanHill (talk) 00:11, 13 October 2020 (UTC)Reply
I agree with Jackmcbarn that this link is redundant and should not be added. * Pppery * it has begun... 20:03, 11 October 2020 (UTC)Reply
  Not done more discussion needed to form a consensus first; as the functionality is already present on the page there isn't an urgent need to do this from a technical level either. Feel free to reactivate the edit request if a consensus to change emerges. — xaosflux Talk 01:44, 13 October 2020 (UTC)Reply
@Xaosflux: 1) The functionality is well-hidden on the page. 2) Where are we meant to seek such a consensus? DuncanHill (talk) 01:46, 13 October 2020 (UTC)Reply
@DuncanHill: right here is fine. As far as hidden, I don't use it much but did just take it for a ride and it was quite easy to use - went to an article, clicked on what links here, and saw all the links - the interface shows all the pages that transclude, link, or redirect to the page and gives you the option to not see any of those things. In following the short discussion above it appears that some editors want to add a shortcut to the "not transclude AND and NOT link" results and call it "redirects only" - and some editors think that is unnecessary. I would think the same argument could be made for other combinations (e.g. "transclusions only") and it would have the same opposition - basically that this isn't needed. On a related note, the top of WLH does link to Help:What links here already - and I think the directions call out exactly what you are looking for in Help:What_links_here#Only_show_incoming_redirects ? — xaosflux Talk 10:42, 13 October 2020 (UTC)Reply
So you're closing the discussion on this page because more discussion on this page is needed There is nothing on the what links here page at the moment to tell people how to see redirects only. There's an option to hide them, not an option to shew them. "hide links" implies that it hides links, not that it shews redirects! Nothing about "hide transclusions + hide links" implies in any way that the effect is to shew redirects. Redirects are links, so "hide links" ought to hide them as well! We shouldn't have to navigate away from the page in order to use it. Just because some people do not need something does not mean that nobody would have it. DuncanHill (talk) 14:44, 13 October 2020 (UTC)Reply
@DuncanHill: absolutely not! I've deactivated the immediate edit request that is prompting patrolling administrators to make an edit that is ready to go, but is otherwise being prevented by protection (in this case namespace protection). Edit requests are an important check against protection restrictions. As I noted above, the discussion should certainly continue. — xaosflux Talk 14:50, 13 October 2020 (UTC)Reply
While the proposed link is mildly superfluous (should ideally be fixed by making a change to MediaWiki to have the filters work like the checkboxes like on Special:Contributions), we did have a link that did this up until recently. Another solution might be to change "Hide links" to "Hide links from pages". The interface is usable if you know what you're looking for (up until last week WP:WLH didn't mention this), but it is not 'discoverable' since the wording "Hide links" does not do what I assumed it did, and that when one sees "Hide redirects" one automatically tries to find an opposite of that ("Show redirects"), which is not available. – Thjarkur (talk) 23:44, 13 October 2020 (UTC)Reply

Protected edit request on 8 March 2021 edit

I created the tool https://linkcount.toolforge.org to get the number of wikilinks, redirects, transclusion, file links (if applicable), and category links (if applicable) for a page. The tool also covers the usage of https://templatecount.toolforge.org, so it makes sense to remove it. The tool should be added using the code:

<div class="plainlinks">External tool: [//linkcount.toolforge.org/?project=en.wikipedia.org&page={{urlencode:$1}} Link count]</div>

BrandonXLF (talk) 23:10, 8 March 2021 (UTC) Code edited to include urlencode. BrandonXLF (talk) 14:04, 10 March 2021 (UTC)Reply

That closing curly bracket is a typo, right? Also, the link will probably fail when the page name includes a space, and, given the current code, $1 doesn't seem to include the namespace prefix. So it should probably be this way
<div class="plainlinks">External tool: [//linkcount.toolforge.org/?project=en.wikipedia.org&page={{urlencode:$2}} Link count]</div>
though I might be still missing something. Nardog (talk) 04:48, 10 March 2021 (UTC)Reply
Not sure how that bracket got in there. $1 is the full pagename, so it does include the namespace, but $2 is a wikilink, so it can't be used here. I edited my original code. BrandonXLF (talk) 14:03, 10 March 2021 (UTC)Reply
Ah, I didn't see it was a link and {{PAGENAMEE}} was stripping the prefix. Nardog (talk) 13:42, 12 March 2021 (UTC)Reply
@BrandonXLF: just make sure, is this what you ended up with:
<div class="plainlinks">External tool: [//linkcount.toolforge.org/?project=en.wikipedia.org&page={{urlencode:$1}} Link count]</div>
? — xaosflux Talk 02:24, 14 March 2021 (UTC)Reply
Xaosflux, that is correct. BrandonXLF (talk) 02:54, 14 March 2021 (UTC)Reply
  Donexaosflux Talk 04:19, 14 March 2021 (UTC)Reply

Post-revert discussion edit

I have undone this change, as I feel there should be some measure of discussion before making such a dramatic (and visually garish) change. Primefac (talk) 16:36, 19 March 2021 (UTC)Reply

@Primefac: WP:BRD is fine of course, when you speak of the "dramatic" change, are you referring to the external content? The change in here on enwiki should have been extremely minor. — xaosflux Talk 17:03, 19 March 2021 (UTC)Reply
Yes, I do realize the change here was relatively minor, and was referring to the result of that change. Primefac (talk) 17:05, 19 March 2021 (UTC)Reply
Thanks, was making sure something didn't go crazy that I missed on our own interface! — xaosflux Talk 17:08, 19 March 2021 (UTC)Reply
@Primefac: What do you think was "visually garish"? This new link is many times better than the old and moreover clearly uses styling consistent to OOUI. --Izno (talk) 23:06, 19 March 2021 (UTC)Reply
I suppose I should have said "visually jarring" instead of "garish", as I was expecting this with its nice background and relatively small text, and instead was hit with this, which contains huge boxes and twice as much information, some of which seems relatively useless to me unless I can see where those non-direct transclusions are coming from. Primefac (talk) 11:47, 21 March 2021 (UTC)Reply
So, you had standard UX change whiplash. Got it. Izno (talk) 18:01, 21 March 2021 (UTC)Reply
That's a good way to put it. As I alluded to earlier I'm okay with a consensus determining this is an okay change, but I want there to be a consensus (i.e. BRD at its finest). Primefac (talk) 18:13, 21 March 2021 (UTC)Reply
  • @BrandonXLF: BRD, you will need to advertise this and seek support now that it has been reverted. — xaosflux Talk 17:16, 19 March 2021 (UTC)Reply
    @Xaosflux Where would you recommend I start a discussion? BrandonXLF (talk) 17:39, 19 March 2021 (UTC)Reply
    @BrandonXLF: here is the right place, perhaps link in from WP:VPM to encourage some discussion participants. — xaosflux Talk 17:40, 19 March 2021 (UTC)Reply
    @Xaosflux: Couldn't we at least have the link to BrandonXLF's tool in addition to the existing tool? FWIW I couldn't disagree more with Primefac. BrandonXLF's not only looks better but is far richer in functionality (and faster at least on my end). I just don't see how anyone would find it a dramatic change, let alone "visually garish". And even if they do, it doesn't hurt to have it in addition to, if not in place of, the old one. Nardog (talk) 18:26, 20 March 2021 (UTC)Reply
    @Nardog: we could sure; but I already made a change for this and it was reverted - and interface messages are not a good place to constantly make revisions, so lets see where this discussion goes (it certainly could result in "add both"). — xaosflux Talk 19:43, 20 March 2021 (UTC)Reply
    Let's ask the reverter then. @Primefac: Would you object to adding the new tool in addition to the current one? Nardog (talk) 19:48, 20 March 2021 (UTC)Reply
    I would object to both. The new one is clearly superior. :^) --Izno (talk) 20:19, 20 March 2021 (UTC)Reply
    @Izno: I would too, but not as much as I would to the status quo. I'm only suggesting it as a tentative compromise until a larger consensus is reached. Nardog (talk) 20:22, 20 March 2021 (UTC)Reply
    How about a compromise to the compromise? Use both for maybe a month, and then revisit this discussion? As I mentioned above, I guess I don't really see the benefit to giving all of that extra information unless it can be used in some way (i.e. how are "direct transclusions" and "all transclusions" useful unless I can see the redirects or know how many there are?). I may be in the minority, sure, but I feel like a change like this should have at least some trial period before becoming the "one true way" to view this. Primefac (talk) 11:47, 21 March 2021 (UTC)Reply
    For the point about the transclusion count, the number of redirects to the page is already visible. I could also have, for example, the "Redirects" label link to [1], the "Direct transclusions" label link to [2], and the "All transclusions" link to [3]. This would allow you to see what the count actually counting. I don't want to directly show the redirects as the tool is meant to complement WhatLinksHere and not replace it. BrandonXLF (talk) 21:13, 21 March 2021 (UTC)Reply
    Actually, that would be quite useful. I know it's not a replacement for the on-wiki tools, but "making life easier with fewer clicks" is always appreciated! Primefac (talk) 12:46, 22 March 2021 (UTC)Reply
  • I think we ought to find a way to display those very useful metrics directly on the "what links here" page, without needing to send people to an external tool. Is that possible? {{u|Sdkb}}talk 19:30, 19 March 2021 (UTC)Reply
    The short answer to that question is that I don't think that's technically feasible. Primefac (talk) 11:47, 21 March 2021 (UTC)Reply
    Not for us anyway. Probably feasible to do something like that on the PHP side. Izno (talk) 18:00, 21 March 2021 (UTC)Reply
    Probably using JavaScript, either globally in the site or using an approach like Wikipedia:Get my IP address, calling an external tool to load the data and display it on the interface. But my "just do it with JavaScript" methods tend not to be very popular, so unlikely to happen. ProcrastinatingReader (talk) 20:13, 21 March 2021 (UTC)Reply
  • I will admit I had the same experience as Primefac when I saw it (thinking "what just happened here?"). When I just want to see transclusion count I think I have a mild preference for the current page which just has less information. Surprising for me, actually, maybe I've spent so much time on this site I've gotten used to old school UIs... Anyway, that said, the new tool is functionally nice and it's actually maintained which means it might add more features (such as better template parameters? hint hint). A grey background would be nice for my eyes. Would have a preference for keeping both links up. ProcrastinatingReader (talk) 20:11, 21 March 2021 (UTC)Reply
    I added a grey background. BrandonXLF (talk) 21:24, 21 March 2021 (UTC)Reply

@Xaosflux: Can we restore the link now? Perhaps like:

<div class="hlist inline">External tools:
* [//linkcount.toolforge.org/?project=en.wikipedia.org&page={{urlencode:$1}} Link count]
* [//templatecount.toolforge.org/index.php?lang=en&namespace={{NAMESPACENUMBER:$1}}&name={{PAGENAMEE:$1}} Transclusion count]
</div>

Nardog (talk) 12:25, 25 March 2021 (UTC)Reply

  Done Primefac (talk) 13:00, 6 April 2021 (UTC)Reply

  You are invited to join the discussion at Wikipedia:Village pump (proposals) § Switch to BrandonXLF's link count tool and remove Jarry1250's tool from Special:WhatLinksHere. 🐶 EpicPupper (he/him | talk) 04:16, 13 February 2022 (UTC)Reply

Protected edit request on 19 December 2022: add "Sorted list" external tool edit

Change

<div class="hlist inline">External tools:
* [//linkcount.toolforge.org/?project=en.wikipedia.org&page={{urlencode:{{{1|$1}}}}} Link count]
* [//templatecount.toolforge.org/index.php?lang=en&namespace={{NAMESPACENUMBER:{{{1|$1}}}}}&name={{PAGENAMEE:{{{1|$1}}}}} Transclusion count]
</div>

to

<div class="hlist inline">External tools:
* [//linkcount.toolforge.org/?project=en.wikipedia.org&page={{urlencode:{{{1|$1}}}}} Link count]
* [//templatecount.toolforge.org/index.php?lang=en&namespace={{NAMESPACENUMBER:{{{1|$1}}}}}&name={{PAGENAMEE:{{{1|$1}}}}} Transclusion count]
* [//wlh.toolforge.org/pages/{{PAGENAMEE:{{{1|$1}}}}}?ns={{NAMESPACENUMBER:{{{1|$1}}}}} Sorted list]
</div>

Hello community,

EGardner (WMF) (talk · contribs), JKieserman (WMF) (talk · contribs) and I have been working together on an external tool to be added to MediaWiki:Linkshere and thus included on all Special:WhatLinksHere pages on English Wikipedia. This tool, hosted on Toolforge at, https://wlh.toolforge.org/, provides a sortable list of backlinks (redirects and indirect backlinks through redirects are coming soon) sorted by default in alphabetical order. This has been a requested feature of MediaWiki core since 2005 and a frequently top requested item in the Community WishList Survey. We decided to implement this as an external tool instead of patch to MediaWiki core because there are some concerns about performance implications for well-linked pages on larger wikis. Using toolforge mitigates this risk by allowing us to roll out this tool one wiki at a time targeting the toolforge replica of the wiki’s database while monitoring the performance for slow queries. We’re pleased to report that so far, the tool seems performant. For instance, the DB queries for https://wlh.toolforge.org/Philosophy finish in less than 0.5 seconds, and the front-end page loads in about 1 second.

We hope the community will accept the proposal to include this as an external tool titled "Sorted list" on the Special:WhatLinksHere pages alongside the other tools: "Link count," and "Transclusion count." We are also eager to receive your feedback and contributions to improve the tool. The phabricator board for this tool is at phab:project/profile/6307/. A working example of this tool embedded in a Special:WhatLinksHere page can be seen on Beta-Cluster.

Thanks for your consideration! SDunlap-WMF (talk) 19:19, 19 December 2022 (UTC)Reply

Where is the source code for the new tool? Legoktm (talk) 21:22, 19 December 2022 (UTC)Reply
Source code lives on Gitlab currently (this could be moved into Gerrit eventually if desired):
EGardner (WMF) (talk) 22:37, 19 December 2022 (UTC)Reply
@EGardner (WMF): thanks, however I couldn't find any license statement in either of those repositories. Please see "Pick a license". Excited to see more Rust code! Legoktm (talk) 23:13, 19 December 2022 (UTC)Reply
@Legoktm will do (https://phabricator.wikimedia.org/T325605). Your Rust Toolforge tutorial was very helpful in getting this project going by the way! EGardner (WMF) (talk) 23:30, 19 December 2022 (UTC)Reply
@Legoktm thank you for pointing that out. We had specified GPL v3 on our Toolforge projects, https://toolsadmin.wikimedia.org/tools/id/wlh and https://toolsadmin.wikimedia.org/tools/id/wlh-api, but forgot to add them to our GitLab repos. I just added them. SDunlap-WMF (talk) 04:13, 20 December 2022 (UTC)Reply
@SDunlap-WMF is tool going to be supported by the foundation? What is the support model and where is that documented? I don't see info on wikitech, and the tool has no feedback or support buttons on it. — xaosflux Talk 21:57, 19 December 2022 (UTC)Reply
@Xaosflux the short answer is yes, it will be supported by the foundation. All three of us on interested in continuing to be active maintainers and contributors on the project. In the event that we weren't available to support it, as a tool made during the CommTech Wishathon, it would go on being supported by the CommTech team. I can't speak for the others, but I expect to have bandwidth to keep supporting this tool for the foreseeable future. Additionally, thank you for you feedback, I've added a link to our Phabricator board and source code to navigation bar of our tool. SDunlap-WMF (talk) 04:33, 20 December 2022 (UTC)Reply

Stray whitespace after latest edit edit

After this edit, there is an unwanted space between the open parenthesis and the word "link". I think it could be fixed by moving the open parenthesis to just before the opening bracket in the first link: * ([ Pinging JPxG.~ – Jonesey95 (talk) 16:07, 4 January 2024 (UTC)Reply

  Donexaosflux Talk 16:39, 4 January 2024 (UTC)Reply