Page MenuHomePhabricator

Linter: Wikilink inside link nested inside ref nested inside efn not detected
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • Note that the first two instances of the wikilink inside an external link are properly detected by the Linter error detection script. The third instance is not detected.

What should have happened instead?:

  • The third instance of a wikilink inside an external link should be detected and reported on the Page Information page.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
This error is not an invented edge case. It existed at https://en.wikipedia.org/w/index.php?title=%C3%86olus_(1783_ship)&oldid=1167512994 and was found by WPCleaner, reported at https://en.wikipedia.org/w/index.php?title=Wikipedia:CHECKWIKI/WPC_513_dump&oldid=1178536639

The difference between the third error and the two that are detected is that it is inside a pair of ref tags that are in turn nested inside an efn template.

Details

Event Timeline

MSantos moved this task from Backlog to Parsoid on the MediaWiki-extensions-Linter board.
MSantos moved this task from Needs Triage to Linting on the Parsoid board.
ABreault-WMF triaged this task as Medium priority.
ABreault-WMF subscribed.

Sorry for taking so long to triage. The issue is more general than template efn and happens when the ref is the first node of the template. It's is a case of T214241

λ (master) echo "{{1x|1=asdf <ref>[http://www.northernmidlands.tas.gov.au/Page/Page.aspx?Page_Id=345 Northern [[Midlands (Tasmania)|Midlands]] Convict Trail.]</ref>}}" | php bin/parse.php --integrated --wt2lint
{"type":"wikilink-in-extlink","dsr":[0,149,null,null],"templateInfo":{"name":"Template:1x"},"params":[]}

λ (master) echo "{{1x|1=<ref>[http://www.northernmidlands.tas.gov.au/Page/Page.aspx?Page_Id=345 Northern [[Midlands (Tasmania)|Midlands]] Convict Trail.]</ref>}}" | php bin/parse.php --integrated --wt2lint

Change #1174532 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/Cite@master] [WIP] Clobber transclusion data-mw so linting can proceed

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

Change #1174532 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Use unioned data-mw so linting can proceed

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