Thread:FishTank/@comment-3361105-20160427152559/@comment-4522253-20160524205024

Hatebunny wrote: Not to be antagonistic, but we discussed the fact that we would prefer there to be as little Lua as possible, and that you would need to build the portable infoboxes from the ground up - preferably without much Lua.

While I recognize that those two templates are big and unwieldy - and may well benefit from Lua equivalents - the necessity for Lua comes from your coding, not the templates. They work as expected.

The worry, as I've mentioned, is that we won't be able to make necessary changes to our key templates without learning a new coding language - and that isn't really within the realm of possibility. Yes, and no. The issue has less to do with Lua and more to do with putting a page in a Category inside a Portable Infobox. The Portable Infobox has priority on the page, and so EVERYTHING that happens inside a PI has to be independent. Placing TheSort (a wikitext template) inside a Category link means that it doesn't get parsed until after the Portable Infobox is already rendered on the page. Lua is a solution to that only in that the processing is done earlier and processed serverside without having to make a second and third call to what is essentially a third-class priority.

tl;dr: TheSort doesn't work right in PIs because it's wikitext.