![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
@BrownHairedGirl, Dpleibovitz, Colonies Chris, J-beda, Izno, Paine Ellsworth, Koavf, and Primefac: I've pinged some people who haven't worked on this template because I think you are good at solving problems with linty templates. This template misbehaves for Category:Educational institutions established in the 15th century, displaying a small empty box to the left of the "Contents" heading and generating 2 missing end tags and 2 stripped tags for <div>
. Other than this one category, it seems to behave normally. —Anomalocaris (talk) 23:45, 15 March 2021 (UTC)[reply]
Hi@Anomalocaris, Dpleibovitz, Colonies Chris, J-beda, Izno, Paine Ellsworth, Koavf, and Primefac: sorry for being v slow to respond to the ping ... but it's now fixed.[1] Short story: I removed the indent from the first line of the transcluded {{Eiei-cutoff}} notice.
Long story: I created {{CatAutoTOC}} and rewrote {{Eiei-century}} to a parameterless format. So this is the intersection of two templates I built.
When I looked at this, I recalled that I had found a similar problem before, where in some circumstances {{CatAutoTOC}}'s output got mangled, and it took me ages to find a fix. Revisiting it a year later, it took me a while to recall what exactly the cause was.
The issue is that both templates are designed to be as vertically compact as possible, to minimise the degree to which the category listing is pushed down below the fold. The downside of this is that in some rare circumstances this causes the Mediawiki software's HTML tidy software to mangle the output of both templates into a combination which causes trouble.
The precise situation which causes trouble is when these two conditions both apply:
When those two conditions apply, HTML tidy produces a strange quirk of markup which breaks the CSS for the navigation TOC: the browsers try indenting the TOC box, and somehow fail screw up all the styling. The various en.wp stylesheets are so complex that I can't figure exactly what happens under the hood.
But the solution is simple: do not indent any text which appears under the {{Navseasoncats}}, 'cos the indent will break the category.
The reason it occurred only on Category:Educational institutions established in the 15th century is simple: the 15th-c is the only century in this series which has enough pages to trigger a category TOC. Earlier centuries have less content, and later centuries are diffused by decade ... so none of them has a TOC to get mangled.
If complex template issues like this arise again and I am not around, one good person to ask is @Pppery, who has wizard capabilities with templates and Lua modules. --BrownHairedGirl (talk) • (contribs) 05:23, 2 April 2021 (UTC)[reply]