Page MenuHomePhabricator

Provide more efficient way to make cross-wiki internal links (currently zhwp uses a template which runs into expansion size limit)
Open, Needs TriagePublicFeature

Description

right now, zhwiki and some other wiki relies on a template:internal link helper to display x-wiki links, for example if someone does not exist on one language wiki but another, and we want to preserve the link, but also do not want the user to be eluded by the translation(which could vary from articles to articles, we would do sth like {{Internal_link_helper/en|沃尔特·布拉福德·坎农|Walter Bradford Cannon}}, ''le'' is short for {{internal link helper/en}}. so it shows both the translation and the en version link concurrently even though the Chinese article does not exist yet, and the reader will know this links to an article on a different language wiki.
I'm wondering if there could be a more efficient way to do this within the wikimedia software, some sort of magic word instead of template. As of now, the Taylor Swift article can not display some of the templates properly due to reaching the max count for inclusion, one of the key contributor being internal link helper.

Event Timeline

Viztor updated the task description. (Show Details)
Viztor added a project: Chinese-Sites.

Unfortunately it is unclear to me why a template (link seems to be https://zh.wikipedia.org/wiki/Template:Internal_link_helper/en - please include links) is used (what is the advantage?) and what exactly is requested in this task.
Please include 1) clear steps to reproduce to see a problem, 2) expected behavior, 3) actual behavior. In separate sections. See https://www.mediawiki.org/wiki/How_to_report_a_bug for more information - thanks a lot in advance! :)

Unfortunately it is unclear to me why a template (link seems to be https://zh.wikipedia.org/wiki/Template:Internal_link_helper/en - please include links) is used (what is the advantage?) and what exactly is requested in this task.
Please include 1) clear steps to reproduce to see a problem, 2) expected behavior, 3) actual behavior. In separate sections. See https://www.mediawiki.org/wiki/How_to_report_a_bug for more information - thanks a lot in advance! :)

Because vote https://zh.wikipedia.org/wiki/Wikipedia:%E6%8A%95%E7%A5%A8/%E8%B7%A8%E8%AF%AD%E8%A8%80%E9%93%BE%E6%8E%A5%E7%9A%84%E5%A4%84%E7%90%86%E6%96%B9%E5%BC%8F
so we use this template.

Unfortunately I still have no idea what is the problem or what is requested here.
Again, please see T228716#5356506 and structure your task description, into three sections, plus provide clear steps to reproduce. Thanks a lot!

Unfortunately I still have no idea what is the problem or what is requested here.
Again, please see T228716#5356506 and structure your task description, into three sections, plus provide clear steps to reproduce. Thanks a lot!

In my understanding,Viztor think useing temple Internal_link_helper to link to interwiki is troublesome,but we have vote interwiki link's processing method(跨语言链接的处理方式),so he or she think can it make like a Magic_words or conditional expressions.

simply put, there is a template we use for x-wiki link, and when templates are transcluded too many times, the page exceed transclusion limits. As this template is essential in many translated wiki article, it is unavoidable it does run over the limits. The template is used to properly display cross-wiki links, for example, an article exist on enwiki but does not exist on zhwiki, it may use this template as in {{Internal_link_helper/en|沃尔特·布拉福德·坎农|Walter Bradford Cannon}} to denote the other language and page title.

Aklapper renamed this task from more efficient way to do cross-wiki internal link to Provide more efficient way to make cross-wiki internal links (currently zhwp uses a template which runs into expansion size limit).Jul 31 2019, 11:23 AM
Aklapper added a project: MediaWiki-General.

Thanks for the explanation! So this is about https://zh.wikipedia.org/wiki/Template:Internal_link_helper , good :)

Digression.

Can 'Post-expand include size' be separated from '$wgMaxArticleSize'?

'$wgMaxArticleSize' is used to limit the amount of input processed by the wikicode to the parser. But our site uses a lot of templates to generate content, and it seems that the input byte length of some templates is magnified and output about 10 times.

And T15260, Multiple embedding of templates will greatly increase the output byte count of the innermost template, even if the intermediate template does not increase the output byte count.

For example:
' https://zh.wikipedia.org/wiki/Template:Internal_link_helper/en ' is a warpper with specific language parameters of ‘ https://zh.wikipedia.org/wiki/Template:Internal_link_helper ’.

{{Template:Internal_link_helper/en|失策|test}}

‘s output is

<span class="ilh-all " data-orig-title="失策" data-lang-code="en" data-lang-name="英语" data-foreign-title="test"><span class="ilh-page">[[:失策|失策]]</span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link">-{[[:en:test|<span lang="en" dir="auto">test</span>]]}-</span>)</span></span>

And, {{Internal_link_helper/en}} include {{Internal_link_helper}} and {{lan}} (as a Template argument), {{Internal_link_helper}} include {{#invoke:ilh}}. In some {{Navbox}}, {{Internal_link_helper/en}} is included in {{Navbox}} as Template argument value.

I have rewritten implementations of {{Internal_link_helper}}, {{lan}}, a variant of {{Navbox}} to avoid using like {{Navbox subgroup}}, using lua module, but it is difficult to improve the wikicode to avoid to trigger the limitation of the parser.

Shizhao changed the subtype of this task from "Task" to "Feature Request".Feb 9 2022, 2:48 AM