User talk:Pokechu22

From Dolphin Emulator Wiki
Revision as of 06:17, 24 November 2019 by Pokechu22 (talk | contribs) (ifexist vs Template:Exist: re)
Jump to: navigation, search

ifexist vs Template:Exist

Using Template:Exist in certain cases (like on Template:Infobox VG) causes MediaWiki to throw a recursive template loop error (see Category:Pages with template loops). This happens because Template:Exist functions off of transclusion while ifexist does not. That's why ifexist is used instead. I mentioned this on the Template:Exist documentation here though I know that's pretty hard to find and not very explanatory... The tradeoff was triggering an actual error on MediaWiki or creating a bunch of bad redlinks, I chose to silence the errors instead. Either is technically fine though, the errors don't show up on the pages or affect page output at all as far as I can remember besides the hidden error category. (As I understand it, the transcluded templates which trigger the error are not actually used, so page output is not affected.) - Xerxes (talk) 05:26, 24 November 2019 (CET)

Thanks. I actually saw the warning but didn't know what to make of it. (I also didn't see any uses of Template:Exist in the history of Template:Infobox VG so I assumed it just never had been tried before, but I just didn't look beyond the first 50 entries so I missed your edit). IMO, having 243 entries in an error page where pages where the problem is actually present is visible is much preferable to having thousands of entries on a page that also is useful for knowing where to contribute. But I don't know if the error actually causes problems on the server end. (My guess is that the pages (I think I saw that Template:Exist uses pages as templates or something like that?) that trigger the infinite loop are those that actually have multiple versions, where the other version is transcluding the original version again. But I'm not sure if that's actually the case. If it is the case, I wonder if there's a way to detect that it's already at one level of transclusion and just stop?) --Pokechu22 (talk) 06:17, 24 November 2019 (CET)