A recent change to MediaWiki software seems to have broken templates everywhere. The syntax
[[:{{NAMESPACE}}:{{{1}}}|{{{1}}}]]
used to work on a template to generate a link to a page in the same namespace, typically used on templates related to move (rename) discussions.
The change is in, https://gerrit.wikimedia.org/r/#/c/361597/
The commit message there asserts that there were only a handful of pages this was seen to affect in [[mw:Parsoid/Round-trip_testing]].
Nevertheless, I should have communicated it more widely, since that isn't necessarily representative of your wiki.
However this has stopped working as of last month, causing lots of [[::ABC|ABC]] to be displayed in plain-text everywhere when this syntax is used in the main namespace.
Can you quantify "lots"?
https://zh-yue.wikipedia.org/w/index.php?title=Special:%E9%82%8A%E5%BA%A6%E9...
shows less than a hundred main namespace pages.
The justification for the change is that the first colon has meaning, it escapes the link, giving it the default namespace, but the second colon is part of the title.
https://en.wikipedia.org/wiki/:Link
vs
https://en.wikipedia.org/wiki/::Link
We figured for now at yue.wp that [[{{NAMESPACE}}:{{{1}}}|{{{1}}}]] (notice the deletion of the colon at the beginning) works and would like to know if this is the recommended solution. This doesn't seem to have been picked up by Linter.
That isn't exactly the same thing.
For some namespaces (File, Category, etc.) the colon escape renders that syntax as a link rather than construct itself (file, or whathaveyou).
Using that template on pages in those namespaces will have different results.
The pseudocode you want is more like,
if (namespace) { ":" + namespace }
Related discussion on yue.wp: https://zh-yue.wikipedia.org/w/index.php?title=Wikipedia%3A%E5%9F%8E%E5%B8%8...
Deryck [[User:Deryck Chan]] Sysop & ambassador, yue.wp
Sorry for the inconvenience. If the above workaround is unacceptable, let me know, and we'll reassess.
Arlo
Can you quantify lots?
At least 5 templates (including the one discussed in this thread), approx 160 transclusions on yue.wp, mostly in article space. That means 0.25% of all articles.
According to the discussion, zh.wp is affected by this bug too: at least 7 templates, according to my insource search.
en.wp has at least 45 pages with this problem, including 9 templates. [[en:Template:Merge to]] alone has 3000+ transclusions.
Since this change affected [[en:Template:Merge to]] which is a trunk project copied by many other wikis, I expect a very large - probably in the tens of thousands - total number of broken pages.
My insource search string: insource:/"[[:{{NAMESPACE}}:"/
Deryck
On 5 Sep 2017 22:54, "Arlo Breault" abreault@wikimedia.org wrote:
A recent change to MediaWiki software seems to have broken templates
everywhere. The syntax
[[:{{NAMESPACE}}:{{{1}}}|{{{1}}}]]
used to work on a template to generate a link to a page in the same
namespace, typically used on templates related to move (rename) discussions.
The change is in, https://gerrit.wikimedia.org/r/#/c/361597/
The commit message there asserts that there were only a handful of pages this was seen to affect in [[mw:Parsoid/Round-trip_testing]].
Nevertheless, I should have communicated it more widely, since that isn't necessarily representative of your wiki.
However this has stopped working as of last month, causing lots of
[[::ABC|ABC]] to be displayed in plain-text everywhere when this syntax is used in the main namespace.
Can you quantify "lots"?
https://zh-yue.wikipedia.org/w/index.php?title=Special:%E9% 82%8A%E5%BA%A6%E9%8F%88%E5%8E%BB%E5%91%A2%E7%89%88/Template: Mergeto&limit=100
shows less than a hundred main namespace pages.
The justification for the change is that the first colon has meaning, it escapes the link, giving it the default namespace, but the second colon is part of the title.
https://en.wikipedia.org/wiki/:Link
vs
https://en.wikipedia.org/wiki/::Link
We figured for now at yue.wp that [[{{NAMESPACE}}:{{{1}}}|{{{1}}}]] (notice the deletion of the colon at the beginning) works and would like
to know if this is the recommended solution. This doesn't seem to have been picked up by Linter.
That isn't exactly the same thing.
For some namespaces (File, Category, etc.) the colon escape renders that syntax as a link rather than construct itself (file, or whathaveyou).
Using that template on pages in those namespaces will have different results.
The pseudocode you want is more like,
if (namespace) { ":" + namespace }
Related discussion on yue.wp: https://zh-yue.wikipedia.org/w/index.php?title=Wikipedia%
3A%E5%9F%8E%E5%B8%82%E8%AB%96%E5%A3%87_%28%E6%8A%80%E8%A1% 93%29&type=revision&diff=1120463&oldid=1118769
Deryck [[User:Deryck Chan]] Sysop & ambassador, yue.wp
Sorry for the inconvenience. If the above workaround is unacceptable, let me know, and we'll reassess.
Arlo
Thanks for following up, and sorry for the delay.
On Sep 7, 2017, at 2:41 PM, Deryck Chan deryckchan@gmail.com wrote:
Can you quantify lots?
At least 5 templates (including the one discussed in this thread), approx 160 transclusions on yue.wp, mostly in article space. That means 0.25% of all articles.
I see,
https://zh-yue.wikipedia.org/w/index.php?title=Template%3AMergeto&type=r...
I assume you've made similar edits on the others.
According to the discussion, zh.wp is affected by this bug too: at least 7 templates, according to my insource search.
en.wp has at least 45 pages with this problem, including 9 templates. [[en:Template:Merge to]] alone has 3000+ transclusions.
The source here isn't exactly the same, since it sits behind the `target` parameter,
{{#if:{{{target|}}}| ''[[:{{NAMESPACE}}:{{{target}}}|{{{target}}}]]''|
which doesn't seem to be a common use, judging by a search,
insource:/"{{merge to"/i
[[en:Template:Original]] also uses this pattern, but doesn't appear to be used in the main article space.
Since this change affected [[en:Template:Merge to]] which is a trunk project copied by many other wikis, I expect a very large - probably in the tens of thousands - total number of broken pages.
It's certainly possible but, again, we did a bunch of testing and only found a handful of cases in our sample.
Also, this thread is the only place it has currently been surfaced (to me :/).
My insource search string: insource:/"[[:{{NAMESPACE}}:"/
Where do we go from here?
We can revert the change and add comments to the effect that this is acceptable syntax, mentioning this use case, and then go fix up other title parsing implementations.
We can suggest edits to the affected templates we find referencing this thread (and hopefully changes to trunks will propagate out).
I'm partial to the latter.
We can suggest edits to the affected templates we find referencing this thread (and hopefully changes to trunks will propagate out).
Is there any systematic way to discover affected templates? [[:ja:Template:See/core]] seems to be one, but I encountered it just by chance.
-Yusuke
On Fri, Sep 15, 2017 at 7:03 AM, Arlo Breault abreault@wikimedia.org wrote:
Thanks for following up, and sorry for the delay.
On Sep 7, 2017, at 2:41 PM, Deryck Chan deryckchan@gmail.com wrote:
Can you quantify lots?
At least 5 templates (including the one discussed in this thread), approx 160 transclusions on yue.wp, mostly in article space. That means 0.25% of all articles.
I see,
https://zh-yue.wikipedia.org/w/index.php?title=Template%3AMergeto&type=r...
I assume you've made similar edits on the others.
According to the discussion, zh.wp is affected by this bug too: at least 7 templates, according to my insource search.
en.wp has at least 45 pages with this problem, including 9 templates. [[en:Template:Merge to]] alone has 3000+ transclusions.
The source here isn't exactly the same, since it sits behind the `target` parameter,
{{#if:{{{target|}}}| ''[[:{{NAMESPACE}}:{{{target}}}|{{{target}}}]]''|
which doesn't seem to be a common use, judging by a search,
insource:/"{{merge to"/i
[[en:Template:Original]] also uses this pattern, but doesn't appear to be used in the main article space.
Since this change affected [[en:Template:Merge to]] which is a trunk project copied by many other wikis, I expect a very large - probably in the tens of thousands - total number of broken pages.
It's certainly possible but, again, we did a bunch of testing and only found a handful of cases in our sample.
Also, this thread is the only place it has currently been surfaced (to me :/).
My insource search string: insource:/"[[:{{NAMESPACE}}:"/
Where do we go from here?
We can revert the change and add comments to the effect that this is acceptable syntax, mentioning this use case, and then go fix up other title parsing implementations.
We can suggest edits to the affected templates we find referencing this thread (and hopefully changes to trunks will propagate out).
I'm partial to the latter.
Wikitech-ambassadors mailing list Wikitech-ambassadors@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-ambassadors
Whym - This seems to be a very different use case which triggers the same issue. Can you give us a page where this caused a problem in transclusion?
I have a feeling that we should extend Special:LintErrors to cover any template transclusion which ended up dumping [[::Actual title|whatever]] into the as-rendered wikitext.
Deryck
On 15 September 2017 at 09:19, Yusuke Matsubara whym@whym.org wrote:
We can suggest edits to the affected templates we find referencing this thread (and hopefully changes to trunks will propagate out).
Is there any systematic way to discover affected templates? [[:ja:Template:See/core]] seems to be one, but I encountered it just by chance.
-Yusuke
On Fri, Sep 15, 2017 at 7:03 AM, Arlo Breault abreault@wikimedia.org wrote:
Thanks for following up, and sorry for the delay.
On Sep 7, 2017, at 2:41 PM, Deryck Chan deryckchan@gmail.com wrote:
Can you quantify lots?
At least 5 templates (including the one discussed in this thread),
approx 160 transclusions on yue.wp, mostly in article space. That means 0.25% of all articles.
I see,
3AMergeto&type=revision&diff=1123381&oldid=1120457
I assume you've made similar edits on the others.
According to the discussion, zh.wp is affected by this bug too: at
least 7 templates, according to my insource search.
en.wp has at least 45 pages with this problem, including 9 templates.
[[en:Template:Merge to]] alone has 3000+ transclusions.
The source here isn't exactly the same, since it sits behind the `target` parameter,
{{#if:{{{target|}}}| ''[[:{{NAMESPACE}}:{{{target}}}|{{
{target}}}]]''|
which doesn't seem to be a common use, judging by a search,
insource:/"{{merge to"/i
[[en:Template:Original]] also uses this pattern, but doesn't appear to be used in the main article space.
Since this change affected [[en:Template:Merge to]] which is a trunk
project copied by many other wikis, I expect a very large - probably in the tens of thousands - total number of broken pages.
It's certainly possible but, again, we did a bunch of testing and only found a handful of cases in our sample.
Also, this thread is the only place it has currently been surfaced (to me :/).
My insource search string: insource:/"[[:{{NAMESPACE}}:"/
Where do we go from here?
We can revert the change and add comments to the effect that this is acceptable syntax, mentioning this use case, and then go fix up other title parsing implementations.
We can suggest edits to the affected templates we find referencing this thread (and hopefully changes to trunks will propagate out).
I'm partial to the latter.
Wikitech-ambassadors mailing list Wikitech-ambassadors@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-ambassadors
Can you give us a page where this caused a problem in transclusion?
In https://ja.wikipedia.org/wiki/%E3%82%A2%E3%83%A9%E3%83%96%E3%81%AE%E6%98%A5#...
{{main|:en:2011–2012 Morocco protests}}
is rendered with visible brackets as
詳細は「[[::en:2011–2012 Morocco protests|:en:2011–2012 Morocco protests]]」を参照
(Jawiki's {{Main}} uses {{See/core}} to produce links.)
-Yusuke (User:Whym)
On Fri, Sep 15, 2017 at 7:00 PM, Deryck Chan deryckchan@gmail.com wrote:
Whym - This seems to be a very different use case which triggers the same issue. Can you give us a page where this caused a problem in transclusion?
I have a feeling that we should extend Special:LintErrors to cover any template transclusion which ended up dumping [[::Actual title|whatever]] into the as-rendered wikitext.
Deryck
On 15 September 2017 at 09:19, Yusuke Matsubara whym@whym.org wrote:
We can suggest edits to the affected templates we find referencing this thread (and hopefully changes to trunks will propagate out).
Is there any systematic way to discover affected templates? [[:ja:Template:See/core]] seems to be one, but I encountered it just by chance.
-Yusuke
On Fri, Sep 15, 2017 at 7:03 AM, Arlo Breault abreault@wikimedia.org wrote:
Thanks for following up, and sorry for the delay.
On Sep 7, 2017, at 2:41 PM, Deryck Chan deryckchan@gmail.com wrote:
Can you quantify lots?
At least 5 templates (including the one discussed in this thread), approx 160 transclusions on yue.wp, mostly in article space. That means 0.25% of all articles.
I see,
https://zh-yue.wikipedia.org/w/index.php?title=Template%3AMergeto&type=r...
I assume you've made similar edits on the others.
According to the discussion, zh.wp is affected by this bug too: at least 7 templates, according to my insource search.
en.wp has at least 45 pages with this problem, including 9 templates. [[en:Template:Merge to]] alone has 3000+ transclusions.
The source here isn't exactly the same, since it sits behind the `target` parameter,
{{#if:{{{target|}}}| ''[[:{{NAMESPACE}}:{{{target}}}|{{{target}}}]]''|
which doesn't seem to be a common use, judging by a search,
insource:/"{{merge to"/i
[[en:Template:Original]] also uses this pattern, but doesn't appear to be used in the main article space.
Since this change affected [[en:Template:Merge to]] which is a trunk project copied by many other wikis, I expect a very large - probably in the tens of thousands - total number of broken pages.
It's certainly possible but, again, we did a bunch of testing and only found a handful of cases in our sample.
Also, this thread is the only place it has currently been surfaced (to me :/).
My insource search string: insource:/"[[:{{NAMESPACE}}:"/
Where do we go from here?
We can revert the change and add comments to the effect that this is acceptable syntax, mentioning this use case, and then go fix up other title parsing implementations.
We can suggest edits to the affected templates we find referencing this thread (and hopefully changes to trunks will propagate out).
I'm partial to the latter.
Wikitech-ambassadors mailing list Wikitech-ambassadors@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-ambassadors
On Sep 15, 2017, at 6:00 AM, Deryck Chan deryckchan@gmail.com wrote:
I have a feeling that we should extend Special:LintErrors to cover any template transclusion which ended up dumping [[::Actual title|whatever]] into the as-rendered wikitext.
Good idea. I wrote a patch for that, https://gerrit.wikimedia.org/r/#/c/378250/
Thanks Arlo. Please let us know when this patch goes live so we can start linting this problem.
On 18 September 2017 at 19:18, Arlo Breault abreault@wikimedia.org wrote:
On Sep 15, 2017, at 6:00 AM, Deryck Chan deryckchan@gmail.com wrote:
I have a feeling that we should extend Special:LintErrors to cover any
template transclusion which ended up dumping [[::Actual title|whatever]] into the as-rendered wikitext.
Good idea. I wrote a patch for that, https://gerrit.wikimedia.org/r/#/c/378250/
Good idea. I wrote a patch for that, https://gerrit.wikimedia.org/r/#/c/378250/
Thanks - it appears that it started to be deployed. (I saw it on ja.wiktionary.org, although the number of results was 0.)
Would the changed interpretation and the new lint page perhaps be worth mentioning in the Tech News?
-Yusuke
On Tue, Sep 19, 2017 at 9:08 PM, Deryck Chan deryckchan@gmail.com wrote:
Thanks Arlo. Please let us know when this patch goes live so we can start linting this problem.
On 18 September 2017 at 19:18, Arlo Breault abreault@wikimedia.org wrote:
On Sep 15, 2017, at 6:00 AM, Deryck Chan deryckchan@gmail.com wrote:
I have a feeling that we should extend Special:LintErrors to cover any template transclusion which ended up dumping [[::Actual title|whatever]] into the as-rendered wikitext.
Good idea. I wrote a patch for that, https://gerrit.wikimedia.org/r/#/c/378250/
Wikitech-ambassadors mailing list Wikitech-ambassadors@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-ambassadors
On Sep 28, 2017, at 9:24 AM, Yusuke Matsubara whym@whym.org wrote:
Good idea. I wrote a patch for that, https://gerrit.wikimedia.org/r/#/c/378250/
Thanks - it appears that it started to be deployed. (I saw it on ja.wiktionary.org, although the number of results was 0.)
The patch to Parsoid that actually does the linting hasn't been deployed yet. Only the patch to the MediaWiki Linter extension that collects the results has gone out.
Would the changed interpretation and the new lint page perhaps be worth mentioning in the Tech News?
Sure, we can do that, but hold off until this is fully functional. I will send an email to this list later today if / when the Parsoid deploy happens.
Thanks, Arlo
On Sep 28, 2017, at 9:56 AM, Arlo Breault abreault@wikimedia.org wrote:
Would the changed interpretation and the new lint page perhaps be worth mentioning in the Tech News?
Sure, we can do that, but hold off until this is fully functional. I will send an email to this list later today if / when the Parsoid deploy happens.
Parsoid is now deployed, https://www.mediawiki.org/wiki/Parsoid/Deployments#Thursday.2C_September_28.... https://www.mediawiki.org/wiki/Parsoid/Deployments#Thursday.2C_September_28.2C_2017_around_10:45_am_PT:_Y.C2.A0Deployed_2f4b9a8c
And the lint category is starting to be populated, ex. https://en.wikipedia.org/wiki/Special:LintErrors/multi-colon-escape https://en.wikipedia.org/wiki/Special:LintErrors/multi-colon-escape
失礼します。良人だろうかな。Smiley face. 友達になりましょうか。 ジャ、よろしくお願いいたします。
On Thu, Sep 28, 2017 at 9:24 PM, Yusuke Matsubara whym@whym.org wrote:
Good idea. I wrote a patch for that, https://gerrit.wikimedia.org/r/#/c/378250/
Thanks - it appears that it started to be deployed. (I saw it on ja.wiktionary.org, although the number of results was 0.)
Would the changed interpretation and the new lint page perhaps be worth mentioning in the Tech News?
-Yusuke
On Tue, Sep 19, 2017 at 9:08 PM, Deryck Chan deryckchan@gmail.com wrote:
Thanks Arlo. Please let us know when this patch goes live so we can start linting this problem.
On 18 September 2017 at 19:18, Arlo Breault abreault@wikimedia.org
wrote:
On Sep 15, 2017, at 6:00 AM, Deryck Chan deryckchan@gmail.com
wrote:
I have a feeling that we should extend Special:LintErrors to cover any template transclusion which ended up dumping [[::Actual
title|whatever]]
into the as-rendered wikitext.
Good idea. I wrote a patch for that, https://gerrit.wikimedia.org/r/#/c/378250/
Wikitech-ambassadors mailing list Wikitech-ambassadors@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-ambassadors
Wikitech-ambassadors mailing list Wikitech-ambassadors@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-ambassadors
wikitech-ambassadors@lists.wikimedia.org