twinkle
twinkle copied to clipboard
tag: Twinkle doesn't detect {{Self-contradictory}}
Reported by LaundryPizza03 at https://en.wikipedia.org/wiki/Wikipedia_talk:Twinkle#Self-contradictory_tag
Normally if you load a page with maintenance tags, Twinkle will pre-check the maintenance tags when you load the tag module. For {{self-contradictory}}, it does not.
This may make sense since self-contradictory is not in Twinkle's dictionary. But even after adding it to the dictionary, I was still not able to get Twinkle to detect it on this page. This could indicate some bugs within the tag module that need investigation.
https://test.wikipedia.org/w/index.php?title=Alert,_Nunavut&oldid=516643
Twinkle should be able to detect tags for removal even if they are not in its dictionary. This relies upon the fact that ambox templates carry a box-$NAME
class on them, where $NAME is |name=
param in the template source, which should be the same as the name of the template. This works even if a redirect to the template is used on the page. Sometimes though, templates get moved and updating |name=
is forgotten. To account for this, it works even if $NAME is itself a redirect and the same redirect or another one is used on the page, but NOT if $NAME is a redirect and the actual template name is used on the page.
I think changing https://github.com/wikimedia-gadgets/twinkle/blob/15de04dc7f4f792fb684a1d914a15a246d93b088/modules/friendlytag.js#L1471 to
page.linkshere.concat({title: page.title}).forEach(function(el) {
should fix it.