Template talk:Franchise total episodes

Latest comment: 1 year ago by TheTVExpert in topic NCIS (franchise)
WikiProject iconTelevision Redirect‑class
WikiProject iconThis redirect is within the scope of WikiProject Television, a collaborative effort to develop and improve Wikipedia articles about television programs. If you would like to participate, please visit the project page where you can join the discussion.
RedirectThis redirect does not require a rating on Wikipedia's content assessment scale.
WikiProject iconMedia franchises Redirect‑class
WikiProject iconThis redirect is within the scope of WikiProject Media franchises, a collaborative effort to improve the coverage of topics related to media franchises on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
RedirectThis redirect does not require a rating on Wikipedia's content assessment scale.

Parameter problems edit

@TheTVExpert: There must be a more efficient way of handling what this template is doing? It's also awkward that there might be hard-to-see problems in articles when people edit some other article that this template targets. I'm thinking the raw data should be held somewhere (probably in a module), and that data accessed where needed.

One minor point I noticed is that instead of {{val|1234567890|fmt=commas}}, it would be much better to use

{{formatnum:1234567890}} → 1,234,567,890

The following articles have hidden errors due to missing parameters that this template tries to access: Chicago (franchise) + Law & Order (franchise) + NCIS (franchise). In the first of these, Module:Template parameter value is throwing an error from line 17:

local template = escape(args[2])

That is because args[2] is empty. I'm hoping you can fix those problems.

You can see the problem by previewing the following wikitext (copied from Chicago (franchise)) in a sandbox.

{{Franchise Total Episodes
|L1=List of Chicago P.D. episodes
|L2=List of Chicago Fire episodes
|L3=List of Chicago Med episodes
|S1=Chicago P.D. (TV series)
|S2=Chicago Fire (TV series)
|S3=Chicago Med
|S4=Chicago Justice
|name=Chicago
}}

At the bottom of the preview (if the user preference to display hidden categories is enabled), you will see the sandbox is in Category:Pages with script errors. Johnuniq (talk) 08:01, 14 April 2020 (UTC)Reply

@Johnuniq: The errors should be fixed now, but let me know if errors are still occurring. Thanks. TheTVExpert (talk) 13:02, 14 April 2020 (UTC)Reply
Thanks. It's amazing that the wikitext works as well as it does. Johnuniq (talk) 01:51, 15 April 2020 (UTC)Reply

NCIS (franchise) edit

Does anyone feel like fixing NCIS (franchise) which is showing "Lua error in Module:Franchise_total_episodes at line 43: attempt to perform arithmetic on a string value" due to use of {{Franchise total episodes}} at the beginning of the last paragraph in the lead. Johnuniq (talk) 02:43, 10 October 2022 (UTC)Reply

This should be fixed now. TheTVExpert (talk) 03:06, 10 October 2022 (UTC)Reply