Page MenuHomePhabricator

"checkuser-cidr-tool-links" message in Special:CheckUser is not rightly parsed
Closed, ResolvedPublicBUG REPORT

Description

MW version: master
CU version: master

Go to Special:CheckUser and type a valid IP in checkuser-cidr-tool box, the checkuser-cidr-tool-links message is not rightly parsed.

From console:

mediawiki.jqueryMsg: checkuser-cidr-tool-links: Parse error at position 171 in input: {{int:checkuser-cidr-tool-links-prefix}} <span class="plainlinks">[https://www.robtex.com/ip-lookup/$1 WHOIS/RDNS]<span class="mw-checkuser-cidr-checkuser-only"> <b>•</b> [[{{#special:CheckUser}}/$1|{{int:checkuser-cidr-tool-links-checkuser}}]]</span><span class="mw-checkuser-cidr-checkuserlog-only"> <b>•</b> [[{{#special:CheckUserLog}}/$1|{{int:checkuser-cidr-tool-links-checkuserlog}}]]</span></span>

Event Timeline

Dreamy_Jazz triaged this task as High priority.

Thanks for reporting this.

I was the one who made this change. I tested this by modifying the value on the English Wikipedia to use {{#special:CheckUser}} so that the translated name of the special page would be used. However, it seems that while the message definition page at MediaWiki:Checkuser-cidr-tool-links renders correctly, the usage fails when using the message via JS. I had assumed that the message definition in the MediaWiki namespace worked, so it would also work on Special:CheckUser.

This seems to be an inconsistency between the JS message display and PHP message display.

The obvious fix is to revert the change to use the localised special page name. That, however, isn't fully ideal as the complete solution as ideally this should use the localised special page name. As such, I will undo that change and look into why this occurred.

Change 951549 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Remove usage of #special definition as not supported in JS messages

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

@Melos if you want this fixed now, you can define the page MediaWiki:Checkuser-cidr-tool-links with the following content:

{{int:checkuser-cidr-tool-links-prefix}} <span class="plainlinks">[https://www.robtex.com/ip-lookup/$1 WHOIS/RDNS]<span class="mw-checkuser-cidr-checkuser-only">&nbsp;<b>•</b>&#32;[[{{#special:CheckUser}}/$1|{{int:checkuser-cidr-tool-links-checkuser}}]]</span><span class="mw-checkuser-cidr-checkuserlog-only">&nbsp;<b>•</b>&#32;[[{{#special:CheckUserLog}}/$1|{{int:checkuser-cidr-tool-links-checkuserlog}}]]</span></span>

Otherwise, I intend to backport this fix to all wikis once it's merged so hopefully in a couple of days it should be fixed.

@Melos if you want this fixed now, you can define the page MediaWiki:Checkuser-cidr-tool-links with the following content:

Thank you for your fix! I think we can wait the normal deployment train (message can be easily overwritten locally).

Okay. I will wait for the normal train then. Thanks.

Change 951549 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Remove usage of #special definition as not supported in JS messages

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

This bug is now resolved. If desired, the localisation of the special name link can be done in another task.