User talk:CalendulaAsteraceae

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Issue with Module:Bicolor, Template:Bicolor9, and similar templates[edit]

I've noticed an issue with {{Bicolor9}}, {{Bcolor Y}}, {{Bicolor X}}, {{Bicolor2}}, and {{Bicolor3}}.

On those templates' pages, the documentation subpage won't appear properly. The post-expand include size is also large enough that each of those templates is listed in Category:Pages where template include size is exceeded:

My guess is that this results from a case of too many non-rendered tranclusions. Curiously, none of the issues happen with {{Bicolor4}} (which doesn't have a documentation subpage), even though it also uses the new parameters you added to Module:Bicolor for {{Bicolor}} to use. Might it be from not using {{TemplateBox}} in each documentation subpage? Shāntián Tàiláng (talk) 20:14, 28 February 2024 (UTC)Reply[reply]

Oof, yeah. IIRC this is because the template is including all the color combinations and then hiding the ones that don't have corresponding categories, which is, it turns out, a lot of combinations. This is arguably an improvement on the previous code where it was calling ifexist on every category (and putting pages in Category:Pages with script errors thereby) but, you know, only arguably. Ideally I'd like to add some sort of filter to Module:Bicolor for which categories exist which is less expensive than ifexist (get a list of all a category's subcategories?), but I'm not really sure how one would do that. —CalendulaAsteraceae (talkcontribs) 03:31, 29 February 2024 (UTC)Reply[reply]