Community Wishlist Survey 2022/Miscellaneous/Check if a page exists without populating WhatLinksHere

Check if a page exists without populating WhatLinksHere

  • Problem: Does a wiki page exist? This should be a simple thing to check in a template or module, and it partly is – you can use the #ifexist parser function. However, due to the way that this has been implemented in MediaWiki, this has unexpected consequences: pages that call the templates/modules that do this check will now appear in Special:WhatLinksHere. These false flags cause significant problems for editors that are working on resolving misplaced wikilinks, such as links to redirects or disambiguation pages. That in turn leads to them objecting to the use of any template/module that checks for the existence of a page to see if they should link to it.
  • Proposed solution: Rework the MediaWiki database structure so that uses of #ifexist do not also appear in Special:WhatLinksHere – although this is not easy.
  • Who would benefit: Template developers who need to check if a page exists. Editors resolving disambiguation links on all wikis who don't want to see false links.
  • More comments: This is a perennial request to fix some long-standing technical debt. It has been proposed in the 2015, 2017, 2019, and 2021 wishlists. There is a work-around that uses page protection information, see en:Template:Linkless exists, but this isn't a long-term solution.
  • Phabricator tickets: phab:T14019 (from 2007), phab:T268526 (the wider database structure issue)
  • Proposer: Mike Peel (talk) 19:04, 14 January 2022 (UTC)

Discussion

This also causes a quirk at Wikisource. The proofreading statistics (how many pages exist, how many are proofread or validated, etc) for an index can be gathered using Lua. Obviously, this has to check that pages exist, which means registering a template dependency on every page in the index, existing or not so that if pages change status the stats are correct (note: the actual counts of page statuses in an index don't require to access every page). The upshot is that pages like the monthly overviews of things like the s:en:Wikisource:Monthly Challenge appear to transclude very very many pages, though they actually do not transclude a byte of content. There is an idea for a workaround to add an "approximate" mode to the stats function, which would dispense with the template link, but this would rely on pages using approximate stats to purge regularly, as changes to or creations of the pages would not cause an update. It would be better if there could be some concept of non-transcluded, non-linking dependency. Inductiveload (talk) 20:09, 14 January 2022 (UTC)

Procrastination is the #1 reason why the problem still has not been fixed despite requests from past surveys. People put things off all the time, so the developers put off implementing the required changes (in other words, they procrastinate). Next time, we should set reminders and deadlines so that the developers know to implement the required changes to prevent pages with #ifexist checks from appearing in Special:WhatLinksHere and stop procrastinating. GeoffreyT2000 (talk) 21:26, 14 January 2022 (UTC)

Why isn't en:Template:Linkless exists a long-term solution? Seems to me it would likely be a lot easier to make the #ifexist parser function use the "linkless exists" technique than to rework the MediaWiki database structure. I tried voting support below, but tired of the edit conflicts and it's not worth the waste my time to try voting again. Wbm1058 (talk) 20:45, 28 January 2022 (UTC)

@Wbm1058: It seems to work as a work-around, but having to ask 'what is the page protection' if you want to ask 'does this page exists' is fundamentally illogical. It also doesn't seem to be available via Lua (unless I've missed something). Thanks. Mike Peel (talk) 21:03, 28 January 2022 (UTC)
Because it's a hack. It works because of the peculiar behavior of the {{PROTECTEDEXPIRY:}} magic word, which might change at some point. Also not sure the caches are correctly updated when the page exists. Strainu (talk) 21:12, 28 January 2022 (UTC)
Well, I say just HACK AWAY! You'll get more satisfaction than waiting for the Cleveland Browns to appear in a Super Bowl. And if the developers are sufficiently annoyed by the hacks then that might just motivate them to fix it right. Wbm1058 (talk) 21:26, 28 January 2022 (UTC)
@Wbm1058, Strainu, and Mike Peel: Yes, it's a hack, or possibly an exploit of a data leak in MediaWiki. If you can think of a more elegant way to achieve this, please enhance the template! The Lua version was deleted per en:Wikipedia:Templates_for_discussion/Log/2018_October_10#Module:Linkless, but I have my original effort stored locally if anyone would like to use it in another module. Certes (talk) 19:45, 21 February 2022 (UTC)

Unexplained "oppose" comments such as that below are very unhelpful. There is nothing in them that can be addressed, nor that informs other editors of any problems that might have been identified. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:47, 9 February 2022 (UTC)

Voting

  •   Support * Pppery * it has begun 18:42, 28 January 2022 (UTC)
  •   Support Procrastinators, please start working on the required patches this year! GeoffreyT2000 (talk) 18:46, 28 January 2022 (UTC)
  •   Support It is essentially a bug at the moment — GhostInTheMachine talk to me 18:56, 28 January 2022 (UTC)
  •   Support. Arlo Barnes (talk) 19:25, 28 January 2022 (UTC)
  •   Support Wikisaurus (talk) 19:25, 28 January 2022 (UTC)
  •   Support Kaybeesquared (talk) 19:27, 28 January 2022 (UTC)
  •   Support. It's an annoying issue, which should have been fixed years ago already. --Matthiaspaul (talk) 19:29, 28 January 2022 (UTC)
  •   Support Long overdue. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:40, 28 January 2022 (UTC)
  •   Support again. Debatably a bug. We can afford to fix this. Certes (talk) 19:41, 28 January 2022 (UTC)
  •   Support yet again. Just fix it.  — SMcCandlish ¢ >ʌⱷ҅ʌ<  19:45, 28 January 2022 (UTC)
  •   Support The presence of a self-check means that essentially any page tagged for speedy-deletion will warn that there are inbound links when I go to delete it. That makes the inbound-link-check feature useless. DMacks (talk) 19:52, 28 January 2022 (UTC)
  •   Support He3nry (talk) 20:00, 28 January 2022 (UTC)
  •   Support I support it, again and again and again ... until it will be implemented :-) --Andyrom75 (talk) 20:04, 28 January 2022 (UTC)
  •   Support — AfroThundr (u · t · c) 20:07, 28 January 2022 (UTC)
  •   Support Galobtter (talk) 20:12, 28 January 2022 (UTC)
  •   Support Kaganer (talk) 20:18, 28 January 2022 (UTC)
  •   Support --Atamari (talk) 20:19, 28 January 2022 (UTC)
  •   Support USI2020 (talk) 20:27, 28 January 2022 (UTC)
  •   Support Schazjmd (talk) 20:36, 28 January 2022 (UTC)
  •   Support Cabayi (talk) 20:41, 28 January 2022 (UTC)
  •   Support --Serhio Magpie (talk) 20:46, 28 January 2022 (UTC)
  •   Support completely agree, and hope that any overhaul of this also considers other QoL improvements requested for WhatLinksHere at the same time! --YodinT 20:59, 28 January 2022 (UTC)
  •   Support Yes, please! Strainu (talk) 21:00, 28 January 2022 (UTC)
  •   Support — Draceane talkcontrib. 21:32, 28 January 2022 (UTC)
  •   Support enL3X1 ¡‹delayed reaction›¡ 22:04, 28 January 2022 (UTC)
  •   Support Lectrician1 (talk) 22:31, 28 January 2022 (UTC)
  •   Support Jon Harald Søby (talk) 22:40, 28 January 2022 (UTC)
  •   Support Jheald (talk) 23:21, 28 January 2022 (UTC)
  •   Support Inductiveload (talk) 23:27, 28 January 2022 (UTC)
  •   Oppose Given a) the technical challenge and b) almost 0 value in doing this proposal. --Izno (talk) 23:29, 28 January 2022 (UTC)
  •   Oppose I'm surprised to see the number of votes here. Resolving technical debt is good, but I'm not seeing a strong benefit here to warrant the high development cost. {{u|Sdkb}}talk 00:30, 29 January 2022 (UTC)
  •   Support This longstanding technical debt has negatively impacted wiki link tracking for years. I think those who oppose the idea should instead try to convince the community to close the Phab ticket. Huji (talk) 01:36, 29 January 2022 (UTC)
  •   Support --𝑇𝑚𝑣 (𝑡𝑎𝑙𝑘) 01:50, 29 January 2022 (UTC)
  •   Support Betseg (talk) 02:08, 29 January 2022 (UTC)
  •   Support every year 😪 JWBTH (talk) 03:00, 29 January 2022 (UTC)
  •   Support stop making sexy new gadgets that will get left to decay, start fixing the existing technical issues. Gnangarra (talk) 06:38, 29 January 2022 (UTC)
  •   Support«« Man77 »» [de] 09:38, 29 January 2022 (UTC)
  •   Support WhatLinksHere is already broken, it populates many unexpected links on many Wikidata items. --Liuxinyu970226 (talk) 11:23, 29 January 2022 (UTC)
  •   Support Astronemma (talk) 13:11, 29 January 2022 (UTC)
  •   Support NguoiDungKhongDinhDanh 13:13, 29 January 2022 (UTC)
  •   Support Aca (talk) 13:44, 29 January 2022 (UTC)
  •   Support BSMIsEditing (talk) 15:10, 29 January 2022 (UTC)
  •   Supportputnik 15:42, 29 January 2022 (UTC)
  •   Support Marwin H.H. (talk) 16:09, 29 January 2022 (UTC)
  •   Support --Naḥum (talk) 17:58, 29 January 2022 (UTC)
  •   Support Shalomori123 (talk) 18:23, 29 January 2022 (UTC)
  •   Support Fixing long-standing MediaWiki bugs, even if doing so is tough, and even if the result is just a little improvement, should be the main priority of all paid WMF developers. If fixing this issue is impossible, say so and decline the phabricator tasks. Leaving them "open" all the time is not an option. ToBeFree (talk) 23:07, 29 January 2022 (UTC)
  •   Support Bien sur. –SJ talk  00:22, 30 January 2022 (UTC)
  •   Support TheInternetGnome (talk) 07:57, 30 January 2022 (UTC)
  •   Support Dominic Z. (talk) 14:51, 30 January 2022 (UTC)
  •   Support --Metrónomo-Goldwyn-Mayer 16:18, 30 January 2022 (UTC)
  •   Support Geraki TL 16:29, 30 January 2022 (UTC)
  •   Support daSupremo   22:36, 30 January 2022 (UTC)
  •   Support JPxG (talk) 00:45, 31 January 2022 (UTC)
  •   Support 1dragon (talk) 00:50, 31 January 2022 (UTC)
  •   Support Thingofme (talk) 01:44, 31 January 2022 (UTC)
  •   Support JAn Dudík (talk) 06:19, 31 January 2022 (UTC)
  •   Support No such user (talk) 07:32, 31 January 2022 (UTC)
  •   Support Iniquity (talk) 09:07, 31 January 2022 (UTC)
  •   Support β16 - (talk) 10:59, 31 January 2022 (UTC)
  •   Support the wub "?!" 14:22, 31 January 2022 (UTC)
  •   Support Dreamy Jazz talk to me | enwiki 14:40, 31 January 2022 (UTC)
  •   Support Matma Rex (talk) 16:33, 31 January 2022 (UTC)
  •   Support Novak Watchmen (talk) 17:08, 31 January 2022 (UTC)
  •   Support Normal Name (talk) 22:50, 31 January 2022 (UTC)
  •   Support Patsagorn Y. (Talk) 04:05, 1 February 2022 (UTC)
  •   Support Bencemac (talk) 11:40, 1 February 2022 (UTC)
  •   Support Charitwo (talk) 18:17, 1 February 2022 (UTC)
  •   Support Gahoo (talk) 18:48, 1 February 2022 (UTC)
  •   Support -- Ahecht (TALK
    PAGE
    ) 21:36, 1 February 2022 (UTC)
  •   Support Wargo (talk) 21:49, 1 February 2022 (UTC)
  •   Support Daniel Case (talk) 22:40, 1 February 2022 (UTC)
  •   Support ~ Amory (utc) 20:47, 2 February 2022 (UTC)
  •   Support ☕ Antiqueight chatter 23:38, 2 February 2022 (UTC)
  •   Support FrozenPlum (talk) 00:10, 3 February 2022 (UTC)
  •   Support WikiAviator (talk) 15:45, 3 February 2022 (UTC)
  •   Support Rzuwig 12:21, 4 February 2022 (UTC)
  •   Support —— Eric LiuTalk 06:10, 5 February 2022 (UTC)
  •   Support Otr500 (talk) 13:53, 5 February 2022 (UTC)
  •   Support - Darwin Ahoy! 15:11, 5 February 2022 (UTC)
  •   SupportThanks for the fish! talkcontrib (he/him) 21:39, 5 February 2022 (UTC)
  •   Support--Vulp❯❯❯here! 04:34, 6 February 2022 (UTC)
  •   Support Ayumu Ozaki (talk) 07:20, 6 February 2022 (UTC)
  •   Oppose --Ciao • Bestoernesto 17:31, 6 February 2022 (UTC)
  •   SupportDaxServer (t · c) 20:52, 6 February 2022 (UTC)
  •   Support ~Cybularny Speak? 20:53, 7 February 2022 (UTC)
  •   Support Sunpriat (talk) 01:25, 11 February 2022 (UTC)
  •   Support Facenapalm (talk) 15:12, 11 February 2022 (UTC)
  •   Support Nehaoua (talk) 16:01, 11 February 2022 (UTC)
  •   Support While Linkless exists exists, it is not a long-term solution. stjn[ru] 16:52, 11 February 2022 (UTC)
  •   Support -BRAINULATOR9 (TALK) 17:25, 11 February 2022 (UTC)