Page MenuHomePhabricator

Template:地方 disappears (partially or entirely) in some articles in zh-classical wikipedia (due to use of non-breaking spaces)
Closed, InvalidPublicBUG REPORT

Event Timeline

oteishisama renamed this task from Template:地方 seems to be disappearing (partially or entirely) in some articles to Template:地方 seems to be disappearing (partially or entirely) in some articles in zh-classical wikipedia.May 13 2019, 5:01 PM

This seems to be caused by using non-breaking spaces in the transclusion. For example, in this one from https://zh-classical.wikipedia.org/wiki/廿九棕櫚村:

{{地方
|地方         = 廿九棕櫚村
|地方原文     =Twentynine Palms
|旗號        =
|徽號         = 
|地圖         = File:San Bernardino County California Incorporated and Unincorporated areas Twentynine Palms Highlighted.svg
|歸屬         = [[美國|花旗國]]
|所屬         = 
|屬地         = [[加利福尼亞州]][[聖貝納迪諾縣]]
|治所         = 
|執事         = 
|用語         = [[英語]]
|人口         = 二萬五千卌八
|建置         = 
|省置         = 
}}

Every other space used to align the = signs is a U+00A0 NO-BREAK SPACE rather than a normal space. These spaces are included in the parameter names, and cause the template to not "see" the parameters, and render an empty table.

Replacing them with normal spaces (or removing them) fixes the issue.

This might be the expected behavior?

This seems to be caused by using non-breaking spaces in the transclusion. For example, in this one from https://zh-classical.wikipedia.org/wiki/廿九棕櫚村:

{{地方
|地方         = 廿九棕櫚村
|地方原文     =Twentynine Palms
|旗號        =
|徽號         = 
|地圖         = File:San Bernardino County California Incorporated and Unincorporated areas Twentynine Palms Highlighted.svg
|歸屬         = [[美國|花旗國]]
|所屬         = 
|屬地         = [[加利福尼亞州]][[聖貝納迪諾縣]]
|治所         = 
|執事         = 
|用語         = [[英語]]
|人口         = 二萬五千卌八
|建置         = 
|省置         = 
}}

Every other space used to align the = signs is a U+00A0 NO-BREAK SPACE rather than a normal space. These spaces are included in the parameter names, and cause the template to not "see" the parameters, and render an empty table.

Replacing them with normal spaces (or removing them) fixes the issue.

This might be the expected behavior?

It seems to be working without the U+00A0 NO-BREAK SPACE. Thank you!

Aklapper renamed this task from Template:地方 seems to be disappearing (partially or entirely) in some articles in zh-classical wikipedia to Template:地方 disappears (partially or entirely) in some articles in zh-classical wikipedia (due to use of non-breaking spaces).May 15 2019, 11:44 AM
Aklapper changed the task status from Resolved to Invalid.