twinkle icon indicating copy to clipboard operation
twinkle copied to clipboard

tag: Twinkle doesn't detect {{More footnotes needed}}

Open NovemLinguae opened this issue 1 year ago • 2 comments

Steps to reproduce

  • https://en.wikipedia.org/w/index.php?title=Montgomery_Riverfront_brawl&oldid=1174308453 (which includes the wikicode {{More footnotes needed|date=September 2023}})
  • TW->Tag
  • uncheck {{More footnotes}}
  • type "sufficient citations" for the reason
  • click "submit query"

What happens? image

NovemLinguae avatar Sep 07 '23 17:09 NovemLinguae

The template {{More footnotes needed}} currently produces the css class box-More_footnotes instead of box-More_footnotes_needed, meaning that when Twinkle.tag.alreadyPresentTags is populated, it populates it with the name of the redirect to the template instead of the real name. Due to reasons in later processing, once it finally comes time to remove the tag, it will successfully find and try to remove all redirects to the template but never the original template, creating the situation in your example.

TL;DR the issue is technically the template not twinkle (though maybe the code could be made to not be fooled by the template pointing to a redirect?)

Edit note: Because the warning message that says it "failed to find template X" uses the page given by the api request, it returns the resolved target of the page instead of the original page it picked up, so we already have the data available, I'm just not confident enough with javascript to cleanly include that name as part of the forEach

9382 avatar Nov 14 '23 12:11 9382

I'll also note I've just seen #1618 which appears to be the exact same bug

9382 avatar Nov 14 '23 18:11 9382