Page MenuHomePhabricator

DuplicateLinks tasks should ignore self-links
Open, Needs TriagePublicFeature

Description

Feature summary:
Make the duplicateLinks tasks ignore links to the same-page by default.

Use case(s):
Some projects use self-links in templates a significant amount, e.g. Japanese Wikipedia uses {{visible anchor}} which has the page linking to the same page (e.g. https://ja.wikipedia.org/wiki/古代エジプト文字の解読#中世イスラム世界). The cleanest way to prevent these from appearing (without dis-enabling the suggestion type for the entire page via the lacksTemplate parameter) is to simply not show these suggestions for self-links.

See also:
Original bug-report: https://www.mediawiki.org/wiki/Talk:VisualEditor/Suggestion_Mode/Feedback#duplicateLink_on_古代エジプト文字の解読_at_jawiki

Event Timeline

Change #1279314 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] DuplicateLinkEditCheck: Add ignoreFragmentSelfLinks config

https://gerrit.wikimedia.org/r/1279314

BTW, could we also add a check if a page has a "true" self-link, not fragment self-link -- like the ones that don't work and show in bold (except from those in navigation templates)? Should I file a separate task?

BTW, could we also add a check if a page has a "true" self-link, not fragment self-link -- like the ones that don't work and show in bold (except from those in navigation templates)? Should I file a separate task?

I wonder if that's a common enough problem to be worth the effort? [I.e. the time it would take the team to implement the code (whilst excluding nav-templates), and the translatewiki-translators to work on the strings in 300 languages, and me/us writing the MW documentation section, and anyone who spends time reading the documentation...] -- It's often a fuzzy-line/judgement-call, but I'm hesitant for this particular idea... -- In other words: Is this a mistake that newcomers do a lot, that often requires experienced editors to notice and fix? If yes, then file a task; if not, then either ignore, or add to the Edit Check/Ideas page (and note it as "low" in the "Impact" column)

Well, yeah, it's probably a very rare problem -- just thought about it from the self-links mention here.

Change #1279314 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] DuplicateLinkEditCheck: Add ignoreFragmentSelfLinks config

https://gerrit.wikimedia.org/r/1279314