Page MenuHomePhabricator

When TemplateData for a specific template is missing, the link to the template leads to main namespace page
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

When using Visual Editor on Swedish Wikipedia, I typed {{ and got the wizard for adding templates.
The template says "The "TEMPLATE NAME" template doesn't yet have a description, but there might be some information on the template's page."

What happens?:
The template name does not link to a template, but to a wikipage that does not exist. (Instead of linking to "Template:TEMPLATE NAME", it links to "TEMPLATE NAME").

The link goes to https://sv.m.wikipedia.org/wiki/Dubbel_bild

What should have happened instead?:
The template name should link to the template.
https://sv.m.wikipedia.org/wiki/Mall:Dubbel_bild

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
This problem occurs when I try it on Swedish Wikipedia, but not on English Wikipedia.

Screenshot_20210909-140045_Chrome.jpg (2×1 px, 300 KB)

Event Timeline

Reedy renamed this task from When TemplateData is missing, the link to the template leads to main namespace page. to When TemplateData for a specific template is missing, the link to the template leads to main namespace page.Sep 9 2021, 12:39 PM
Reedy added projects: TemplateData, I18n.

hi @abbedabb – we appreciate you filing this issue. It seems like this issue is no longer occurring. Although, if you are seeing otherwise, please let us know.

In the meantime, @Lena_WMDE I'm pinging you here as we wonder whether y'all might have fixed this as part of the work you are doing to improve template dialogs.

thiemowmde subscribed.

We touched this code a lot. But I think what's going on here is unrelated. As far as I can see the translation was broken. It was fixed just a few days before this ticket was created, see https://translatewiki.net/wiki/Special:Diff/10264596. I believe it took a while before the fixed translation made it to the wiki.

matmarex reopened this task as Open.EditedSep 23 2021, 4:26 PM
matmarex subscribed.

It looks like the English text was changed recently in a similar way: https://translatewiki.net/w/i.php?title=MediaWiki:Visualeditor-dialog-transclusion-no-template-description/en&diff=10255788&oldid=6709446

So I guess that the $1 parameter has been changed from the full page name (Template:Blah) to just the name without namespace (Blah), and $2 was introduced with the full page name. This will break the link in all of the translations, until a translator updates each one. That can take weeks or months in languages with less smaller communities, and should be avoided.

You can check that, although Swedish (sv) was fixed, about half of the languages haven't been updated yet, and still use the wrong parameter for the link: https://translatewiki.net/wiki/Special:Translations/MediaWiki:Visualeditor-dialog-transclusion-no-template-description (outdated translations are marked with red background)

@thiemowmde If possible, can you instead introduce a new parameter without changing existing ones, or introduce an entirely new message key and delete the old message? This would cause the text to display in English until translated, but at least the parameters will work as expected, and it's usually a lesser problem.

(Or, I guess the other approach could be to update all of the messages on Translatewiki, as in this case it can be done without understanding the language.)

thiemowmde set the point value for this task to 1.
thiemowmde moved this task from Sprint Backlog to Demo on the WMDE-TechWish-Sprint-2021-09-15 board.

Uh. Thanks a lot for digging a bit deeper! The idea of this change was to make a group of messages accept the same two parameters. I somehow expected the outdated translations to be marked as "fuzzy" (which happens) and not used any more (which apparently doesn't happen). I checked if other messages are affected the same way. But this is the only one. I ended editing all existing translations manually (and fixed strange mistakes along the way, like translators putting {{GENDER:$2}} in messages that don't even have a $2 parameter).