Page MenuHomePhabricator

Template-equals-category is still populating Category:Pages which use = as a template despite {{=}} now being a magic word
Closed, InvalidPublicBUG REPORT

Description

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

What happens?:
The page is being flagged as a Template-equals-category, and populating Category:Pages which use = as a template despite {{=}} now being a magic word

What should have happened instead?:
{{=}} is a magic word now and should not be getting treated as a template (c.f. https://gerrit.wikimedia.org/r/c/mediawiki/core/+/791685/)

T91154 called for "the next" release to resolve this, however that appears to have been skipped, however that task has been closed and that necessary work does not appear to be elsewhere tracked (please merge this in if so)

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

Other information (browser name/version, screenshots, etc.):

Event Timeline

hmmmmmmm..

https://test.wikipedia.org/wiki/GoodEqualsExample:

{{=}}

works as expected, yet your example:

{{=|arg}}

does not — I have a sneaking suspicion that this is due to variable magic words not supporting parameters (like that). Parser function magic words (which are separate from ParserFunctions because of course they are) do support arguments like that.

Due to this type of magic word not supporting an argument, it appears to be falling back to the still-existing template (which doesn't exactly explain why that category is being added as the template is blank)

(and yes, T91154: {{=}} should be a parser function called for it to implemented as a parser function, but it was added as a variable instead)

Create a page with {{=}} on it, such as https://test.wikipedia.org/w/index.php?title=BadEqualsExample&oldid=517742

To be clear, you're actually doing {{=|arg}}, which isn't supported and is actually invoking a template, like the error indicates.

Here's what you get when you preview that:

Screenshot 2022-07-16 at 18-15-50 Editing BadEqualsExample - Test Wikipedia.png (1×1 px, 336 KB)

Note the "templates used in this preview" includes Template:=. I don't know if this is the ideal behavior, but it does match how {{!}} works, see:

Screenshot 2022-07-16 at 18-19-32 Editing BadEqualsExample - Test Wikipedia.png (1×1 px, 310 KB)

So, despite {{=}} being magic, if passed arguments it bypasses the magic? Is that by design? That is what I'm seeing in the output at https://test2.wikipedia.org/wiki/EqualsTest2 (when Template:= is deleted from that project)

OK, if this is expected behavior nothing to do then I suppose.