Category talk:Pages with template loops

Latest comment: 7 years ago by Wbm1058 in topic Category:Pages with template loops

Category:Pages with template loops edit

Per the above tech news, Category:Pages with template loops now exists to track pages with template loops in them. Some documentation on that Category page about how to fix template loops, assuming that they are a problem, would be welcome. – Jonesey95 (talk) 21:32, 3 April 2017 (UTC)Reply

What's the difference between that category, and Category:Template loop warnings? Problems in the latter category are usually easy to understand. wbm1058 (talk) 21:38, 3 April 2017 (UTC)Reply
The new Category:Pages with template loops automatically tracks all pages where a template loop was encountered during rendering. It may populate slowly as pages are rendered. It can take months before a page is rendered if it isn't edited. The English Wikipedia has added Category:Template loop warnings in MediaWiki:Parser-template-loop-warning since 2009 (the default message has no category). However, the category is only added if MediaWiki:Parser-template-loop-warning is displayed in the rendered page and that only happens if a page tries to display the result of a template loop. For example, on page X the code {{X}} will produce the message and therefore the category. But the code {{#if:{{X}}|A|B}} will not try to display {{X}} which will just evaluate to a non-empty error message during processing, so the #if will display A. Category:Template loop warnings is not added in this case but Category:Pages with template loops is. The former should be a subset of the latter, at least when Category:Pages with template loops has been fully populated. We could also "merge" the two categories by removing our old category from MediaWiki:Parser-template-loop-warning (we could still keep the name by creating MediaWiki:Template-loop-category with it). PrimeHunter (talk) 00:23, 4 April 2017 (UTC)Reply
I picked a page in Category:Pages with template loops, Postbellum, to track down the problem.
Next I isolated the code that was generating the error: {{Language with name/for||Latin|"after the war"}} (trial & error to do that, as there's no obvious error message)
Digging deeper into that, I found:
I'll try to patch Template:ISO 639 name to make the error go away. – wbm1058 (talk) 22:52, 3 April 2017 (UTC)Reply
A fix may already be in that template's sandbox from three years ago. – Jonesey95 (talk) 23:19, 3 April 2017 (UTC)Reply
This patch cleared the problem from Postbellum. – wbm1058 (talk) 23:21, 3 April 2017 (UTC)Reply
Yuck. Fix one issue and the side-effect of that is to introduce another. Now there are a ton of false-positive {{error}} transclusions.
Taking this off the village pump; see Template talk:ISO 639 name#Return empty string for codes not on the list. @Jonesey95: you may be interested in this as I see you created Category:Articles containing unknown ISO 639 language template. – wbm1058 (talk) 18:33, 4 April 2017 (UTC)Reply