Module talk:Sports table/Archive 2

Again on some bugs I noted
Hi, I'm again here with some bugs/feature requests I would like to note. All of them are in my sandbox, but they can be summed up as two main problems:
 * 1) compatiblity and/or showing of bonus/penalty/starting points; and
 * 2) editable played/points columns.

For each problem I've presented a couple of examples of what I mean. Thanks. --Sannita - not just another it.wiki sysop 15:09, 28 November 2019 (UTC)
 * Example 1 : Use bonus_header and show_bonus_points. I reckon this is to blame for example 2 :   : it will use adjust_points then startpoints then 0 rather than adding them together. If there are bonus points and penalties require separate columns then this will require a further change. I've added them to your tables as an example. Spike &#39;em (talk) 15:26, 28 November 2019 (UTC)
 * Spike &#39;em, thank you for identifying the bug. I have fixed this part.  I would support having a yes to have a separate starting points column.  first, we should probably get an idea of how many pages are using both adjust_points and startpoints to make sure there are no surprises (now tracking in category:Pages using sports table with both adjust and startpoints). Frietjes (talk) 15:38, 28 November 2019 (UTC)
 * You can hide the played column using yes, which I think is what you want for Example 2. In each case yes not only hides the data columns, but also the result. If another usage of this parameter is needed then it would need more code changes. As to setting the played column to what you need, then I'd add the required number to the losses (can even enter it as "3+2" if you know there are 3 actual losses and 2 missing games) Spike &#39;em (talk) 16:26, 28 November 2019 (UTC)
 * Note: it is possible to set the Pld column directly using matches_ABC but these are only used if at least one of win_ABC draw_ABC or loss_ABC are blank or non-numeric. It would require a code change (a new table param?) to use this value to override the sum of W+D+L, even if all values are set. Something like if yesno(Args['override_matches'] or 'no') or tonumber(Args['win_'..team_code_ii]) == nil or tonumber(Args['draw_'..team_code_ii]) == nil or tonumber(Args['loss_'..team_code_ii]) == nil then Spike &#39;em (talk) 16:54, 28 November 2019 (UTC)
 * I possibly have not understood correctly the situation, if so, correct me. Is the situation is that there are 10 played games, but we (the editors) know only results for 8 of them, then to manually set it to 10 played games but add data only for 8? If so, then maybe just add another param unknown_results or something and then it will count W+D+L+Unknown and add a note to played cell explaining that there are missing results for x amount of games; possibly also adding the page to a tracking category. --Gonnym (talk) 17:35, 28 November 2019 (UTC)
 * That is my understanding : we know the final games played and points totals, and some (but not all) of the individual results. I think on the given Example 1 we can work out the full WDL record for each team (ARS must have beaten SIR at home, and SIR drew one and lost one against SCL), but I guess that is beside the point. Spike &#39;em (talk) 10:11, 29 November 2019 (UTC)


 * thank you for your answers, and sorry for being this late in answering - other things took over, as always...
 * About the bonus/penalty/starting points, IMHO they should be treated as three different things, although I do not know how many cases there are of teams that get bonus points and penalty points. I think I found an example somewhere, but it's lost in my laptop's folder, and it might take a while to find it again.
 * About the hide_played, I did not know it existed, but it's interesting to know. :) TBH, I'd use matches_ABC, but in some way this should be used also when win_ABC draw_ABC or loss_ABC are not blank. Otherwise the unknown_results proposal is also good.
 * Thank you again for your help! --Sannita - not just another it.wiki sysop 16:31, 3 December 2019 (UTC)
 * we have Category:Pages using sports table with both adjust and startpoints to find pages using both adjust and start points. I don't see any articles in there, so we can definitely split the two without any problems.  we will, however, need to be careful with any headers to make sure we don't mislabel anything.  I don't entirely understand the need for unknown_results_XYZ since you can set the number of matches manually with matches_XYZ.  yes, it is true that in order for that parameter to work you must have a non-numeric value in least one of the win_XYZ, draw_XYZ, and loss_XYZ.  but, this makes sense since more than one of them must be unknown for the number of matches to be unknown.  you simply put a ? or some marker after the value to have it considered as non-numeric (see [//en.wikipedia.org/w/index.php?title=User%3ASannita%2Fsandbox&type=revision&diff=928479049&oldid=928478805 this edit]).  I do see that the results column is always hidden if you have yes.  I don't know the best user syntax for having all the Pld/W/D/L/GF/GA hidden but still having the points and results columns shown.  come up with some good input syntax and I can certainly make it work in the module. Frietjes (talk) 17:30, 3 December 2019 (UTC)

Hiding GF&GA columns
I have a table where the source only gives information on GD but not on GF or GA:. Is there a way I can hide the GF and GA columns and only display the GD column? Chanheigeorge (talk) 23:00, 4 January 2020 (UTC)
 * Chanheigeorge, okay, y should work now. Frietjes (talk) 16:33, 5 January 2020 (UTC)

Hockey
Hi, I'm using the template for different sports and I noticed width is different for Ice Hockey and other sports, is there any specific reason ? I think they should be all the same.

Mohsen1248 (talk) 13:26, 5 January 2020 (UTC)
 * They have different columns due to different rules about draws (or lack of them). Do you have any pages which mix usage of these tables that are experiencing problems? Spike &#39;em (talk) 14:51, 5 January 2020 (UTC)
 * in addition, sometimes there are different point multipliers assigned for OTW/OTL vs PKW/PKL. Frietjes (talk) 16:34, 5 January 2020 (UTC)
 * I still can't understand why for example the "pos" column should be different in those two tables. I didn't say why they have different columns, obviously I know they are different sports, I mean why column width is different. why hockey tables are wider ? Mohsen1248 (talk) 17:36, 5 January 2020 (UTC)
 * WDL has a standard column width of 28, whereas WDL OT (which WL OT invokes) has 32. Each of these has been the same since the modules were first created in 2014 / 2016 respectively. As to why this was done you'd have to ask the module creators (though it maybe that the 3 letter column headings are too wide to fit in the 28 pixel columns, so all the columns were widened so that they are constant within a given table?) Spike &#39;em (talk) 21:41, 5 January 2020 (UTC)
 * I can see the reason but if the whole idea of creating this Module:Sports table is to standardize all sport tables then it should be the same as others. I think maybe they can only keep those two columns at "32 pixel" or maybe even make it OW and OL instead of OWL and OTL. Mohsen1248 (talk) 11:29, 7 January 2020 (UTC)

Abbreviation issue
The right-hand side of the tables at the Group A section 2015 Ken Galluccio Cup use abbreviations that aren't written anywhere else in the article. Not sure why the usage is even warranted, as there is certainly enough space to write it out in full (as MOS:ABBR says Always consider whether it is better to simply write a word or phrase out in full, thus avoiding potential confusion for those not familiar with its abbreviation. Remember that Wikipedia does not have the same space constraints as paper.), but even if it's desired, the abbreviations should use abbr as the left-side of the table does - consistent and less confusion for everyone. --Gonnym (talk) 07:33, 1 February 2020 (UTC)

Volleyball
after some discussion on my talk page, I have added alternative syntax to Module:Sports table/Volleyball that is similar to the input format used in. Note that you probably only want to use on input style at a time, but if you do try to use more than one input style, the results should be additive. after my changes, the following should be roughly equivalent note that  means win in 3 sets, which is the same as   in the old vb templates. any win by more than one set is a "big win", and any loss by more than one set is a "big loss". the point values for big wins and big losses are the same as before and can be changed the same as before. let me know if you see any problems. Frietjes (talk) 21:14, 6 February 2020 (UTC)

Legs parameter from Module:Sports results
When the matches are defined in the template, would it be possible to support additional legs (for 3+ meetings in a season) as is done in Module:Sports results? For example here, so the results table doesn't have to be separate. S.A. Julio (talk) 23:15, 24 January 2020 (UTC)
 * Can't you use ThreeLegStart? It has an option to extend it to five legs. Howard the Duck (talk) 13:48, 25 January 2020 (UTC)
 * Doesn't really fit, as this isn't based on aggregate score or winning more matches than the other, but finishing first in a table based on points and goal difference. S.A. Julio (talk) 14:06, 25 January 2020 (UTC)
 * S.A. Julio, probably works now, but let me know if I didn't implement it correctly. Frietjes (talk) 19:27, 26 January 2020 (UTC)
 * , great thanks! Only difference I noticed is the null value doesn't work for leg 3 (just displays a normal blank cell). S.A. Julio (talk) 03:11, 27 January 2020 (UTC)

S.A. Julio, I think you are talking about the difference in the match3_BBB_AAA cell (which is omitted and not set to null) seen here

the interesting thing about this is that if you check the standard 1 leg case you see the same thing. the source of this difference can be found by checking the code for Module:Sports results line 184 which has  which is default dash and Module:Sports table line 472 which has   which has default blank. another interesting feature is that if you were try to put a null in that cell you don't get what you would expect:

unless you remove the note from the result. editors have probably figured this out by now. as far as the inconsistency goes, I am all for making them consistent. if possible, I would like to merge more of the redundant code which would force them to be consistent. the main question is: should the default be dash or should the default be blank? I really don't care either way. Frietjes (talk) 16:16, 27 January 2020 (UTC)
 * , thanks a lot for adding the legs functionality to this module. I have tried to add it to the Dutch version as well but weirdly it doesn't work there. nl:Sjabloon:Stand Play-off 3 (voetbal België) is one of the instance where its use is desired there. Could you take a look?Tvx1 21:18, 22 February 2020 (UTC)
 * , okay, I think I fixed it. there is a lot there, but you had missed making changes to the header and row subfunctions in nl:Module:Sports results.  now that I have implemented the changes there, it should be working (although I may have missed something). Frietjes (talk) 14:45, 23 February 2020 (UTC)

I've been thinking about this a bit more and I'm starting to wonder why these legs are always generated in pairs (e.g. 2/4/6). In the above example, for instance, I'd think that the sixth column of matches doesn't really need to be there.Tvx1 22:39, 29 February 2020 (UTC)

Head to head column
I have been using the WDL template. In sports that frequently have multiple teams/players tied, it might be more useful to have a separate column for HTH rather than attaching notes to the points column. A hacky way that I have done this is to use

with |rw_NAME=1 (or however many points NAME had among tied teams/players)
 * rw_header=HTH
 * show_rw=yes
 * rwpoints=0

This runs into problems though, especially if |rwpoints=0 gets removed in someone else's edit.

Is there a way someone could make an option for a hth column that appears right after the points column? Thanks!

The main reason I want one is for Chess tournaments. There is a Chess version of Sports table, but I'm not sure how it works exactly. At least, you can't just convert a WDL table into one, which would be kinda necessary. NHammen (talk) 13:49, 23 March 2020 (UTC)

I decided to make one in the sandbox for WDL myself. Testing testing:

Note: Numbers in the crosstable in a white background indicate the result playing the respective opponent with the white pieces (black pieces if on a black background).

Seems to work. How does this get moved from sandbox to main? NHammen (talk) 20:16, 23 March 2020 (UTC)


 * Nevermind. I got the Chess module table to work. So I don't need this to migrate from sandbox anymore. NHammen (talk) 00:31, 5 April 2020 (UTC)

Chess style match table
In the chess style, I would like to make the match table look like the match table from the 2014 candidates tournament (copied below). However, the match table is called from Sports table main, not from the Chess style, so an alteration would have to be made to Sports table main. Would it be acceptable to make a copy of Module:Sports_results called Module:Sports_results/Chess which would only include the necessary functions (header and row I think) so that we could reverse the order of the team and leg loops in that module? In Sports table we would also need to add a line of code after that says . Is that too hacky?

Alternatively, we could add an option in Sports results which flips the order of the team and leg loops, but that would involve duplicating a lot of code in ways that it is easy to break things.

Anyways, I would like the match crosstable to end up looking something like this:


 * {| class="wikitable"

!rowspan="2"|Rank!!rowspan="2" width="250px"|Player !!rowspan="2"|Rating March 2014 !colspan="2" rowspan="2" |1 (VA) !colspan="2" rowspan="2" |2 (SK) !colspan="2" rowspan="2" |3 (VK) !colspan="2" rowspan="2" |4 (SM) !colspan="2" rowspan="2" |5 (DA) !colspan="2" rowspan="2" |6 (LA) !colspan="2" rowspan="2" |7 (PS) !colspan="2" rowspan="2" |8 (VT) !rowspan="2"|Points !! colspan=3|Tiebreaks ! H2H !! Wins !! SB !colspan=3| !width="13px"|W !width="13px"|B !width="13px"|W !width="13px"|B !width="13px"|W !width="13px"|B !width="13px"|W !width="13px"|B !width="13px"|W !width="13px"|B !width="13px"|W !width="13px"|B !width="13px"|W !width="13px"|B !width="13px"|W !width="13px"|B !colspan=4| NHammen (talk) 20:49, 5 April 2020 (UTC)
 * + Final standings of the 2014 Candidates Tournament
 * - align="center" style="background:white; color:black"
 * style="background:#ccffcc;"|1||align="left" style="background:#ccffcc;"|🇮🇳 Viswanathan Anand
 * style="background:#ccffcc;"|2770
 * style="background:lightgray" colspan="2"|
 * ½||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|1
 * ½||style="background:black; color:white"|½
 * 1||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * 1||style="background:black; color:white"|½
 * style="background:#ccffcc;"|8½ || style="background:#ccffcc;"|—|| style="background:#ccffcc;" |3|| style="background:#ccffcc;"| 57.25
 * - align="center" style="background:white; color:black"
 * 2||align="left"|🇷🇺 Sergey Karjakin
 * 2766
 * ½||style="background:black; color:white"|½
 * style="background:lightgray" colspan="2"|
 * 1||style="background:black; color:white"|0
 * ½||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * 0||style="background:black; color:white"|1
 * ½||style="background:black; color:white"|1
 * ½||style="background:black; color:white"|½
 * 7½||—
 * 3||51.75
 * - align="center" style="background:white; color:black"
 * 3|| align="left" |🇷🇺 Vladimir Kramnik
 * 2787
 * ½||style="background:black; color:white"|½
 * 1||style="background:black; color:white"|0
 * style="background:lightgray" colspan="2"|
 * 1||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * 0||style="background:black; color:white"|½
 * 1||style="background:black; color:white"|0
 * 7||2½
 * 3||49.25
 * - align="center" style="background:white; color:black"
 * 4||align="left"|🇦🇿 Shakhriyar Mamedyarov
 * 2757
 * 0||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|0
 * style="background:lightgray" colspan="2"|
 * 1||style="background:black; color:white"|½
 * 1||style="background:black; color:white"|0
 * 1||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * 7||2
 * 3||48.00
 * - align="center" style="background:white; color:black"
 * 5||align="left"|🇷🇺 Dmitry Andreikin
 * 2709
 * ½||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|0
 * style="background:lightgray" colspan="2"|
 * 1||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|0
 * 1||style="background:black; color:white"|½
 * 7||1½||2||48.50
 * - align="center" style="background:white; color:black"
 * 6||align="left"|🇦🇲 Levon Aronian
 * 2830
 * ½||style="background:black; color:white"|0
 * 0||style="background:black; color:white"|1
 * ½||style="background:black; color:white"|½
 * 1||style="background:black; color:white"|0
 * ½||style="background:black; color:white"|0
 * style="background:lightgray" colspan="2"|
 * 1||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|½
 * 6½||1½||3||45.00
 * - align="center" style="background:white; color:black"
 * 7||align="left"|🇷🇺 Peter Svidler
 * 2758
 * ½||style="background:black; color:white"|½
 * 0||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|1
 * ½||style="background:black; color:white"|0
 * 1||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|0
 * style="background:lightgray" colspan="2"|
 * 1||style="background:black; color:white"|0
 * 6½||½||3||46.00
 * - align="center" style="background:white; color:black"
 * 8||align="left"|🇧🇬 Veselin Topalov
 * 2785
 * ½||style="background:black; color:white"|0
 * ½||style="background:black; color:white"|½
 * 1||style="background:black; color:white"|0
 * ½||style="background:black; color:white"|½
 * ½||style="background:black; color:white"|0
 * ½||style="background:black; color:white"|½
 * 1||style="background:black; color:white"|0
 * style="background:lightgray" colspan="2"|
 * 6||—||2||42.25
 * }
 * }

I built a Module:Sports results/Chess, and now I have some code in the sandbox. Here is the result:

For this to work, now all that needs to be done is that the 3 lines of code from Module:Sports table/sandbox need to be ported to the main Module:Sports table NHammen (talk) 01:02, 7 April 2020 (UTC)
 * You seem to have changed a lot more than 3 lines, is it just the section at the top that you need changing? Spike &#39;em (talk) 09:12, 7 April 2020 (UTC)
 * The diff (https://en.wikipedia.org/w/index.php?title=Special%3AComparePages&page1=Module%3ASports+table&page2=Module%3ASports+table%2Fsandbox) between the current Sports table and the Sports table/sandbox has five lines of code that are different. Two of those differences are just using the sandbox versions of other modules, which have no differences from their main. The other three lines of code are the lines that I added. NHammen (talk) 13:11, 7 April 2020 (UTC)
 * Ah, apologies: I was just diffing the recent changes you made to the sandbox, some of which was just getting that in-line with the main page. Spike &#39;em (talk) 14:02, 7 April 2020 (UTC)
 * No need to apologize. That's entirely understandable. NHammen (talk) 15:45, 7 April 2020 (UTC)
 * NHammen, I made [//en.wikipedia.org/w/index.php?title=Module%3ASports_table&type=revision&diff=949795564&oldid=941992646 this change] which should be effectively what you had, but without the extra require. if we have a situation where there are more sports that have custom results tables, we can always refactor the code to use the equivalent of a "switch" statement there.  hopefully I didn't break anything.  the main reason why I stopped working on the chess submodule was lack of interest from the community.  it seems like you will have more luck than I did. Frietjes (talk) 15:45, 8 April 2020 (UTC)
 * Frietjes, thank you. That works great! NHammen (talk) 17:51, 8 April 2020 (UTC)

Possible unclosed span tag error
This module appears to be causing unclosed  tags in the formatted teamn table cell. You can see it if you copy the Group A table from 2014 FIFA World Cup qualification – AFC Third Round into Special:ExpandTemplates. Is it possible to close these span tags? Thanks. – Jonesey95 (talk) 15:01, 11 April 2020 (UTC)
 * I see them. These tags come from the column header for the match results table. This is handled by Module:Sports results, which is called from this module. This problem almost certainly arises from the get_short_name function in that module. Unfortunately, there is some rather complex gsub stuff going on there, which seems to be the source of the problem. One solution is to explicitly define short_TTT yourself, so that the meat of the get_short_name function is not called. But this is just hiding the fact that there is an error somewhere in this function. NHammen (talk) 20:07, 12 April 2020 (UTC)

I see the problem. The command  removes everything after the closing span for the. But at the point it is called in this example, the only thing after that closing span is the closing span for the. I am hesitant to remove that line of code, because it must be there for a reason. Maybe it should strip everything before the  as well? So that would be. NHammen (talk) 20:24, 12 April 2020 (UTC)
 * before I go into the sandbox to fix this issue, do you remember why the line of code in this diff (https://en.wikipedia.org/w/index.php?title=Module:Sports_results&diff=926327613&oldid=925509592) was added? I don't want to end up breaking something that you had fixed. NHammen (talk) 20:38, 12 April 2020 (UTC)
 * So, I went into the sandbox, and my addition of 2 characters does fix the issue discussed here. Still need to check if it breaks something else. NHammen (talk) 21:21, 12 April 2020 (UTC)
 * I copied over the sandbox. I think you understand the intent of that section of code (to remove everything but the flag in the abbreviation for the team name), so removing stuff before and/or after the flag would be correct. thank you! Frietjes (talk) 15:14, 13 April 2020 (UTC)
 * That's what I figured. Just wanted to be sure, because this could potentially have large effects. And I think I am not so good with the gsub stuff yet. NHammen (talk) 15:56, 13 April 2020 (UTC)
 * That looks good to me. Thanks! – Jonesey95 (talk) 19:38, 13 April 2020 (UTC)

Average number of points per matches played
Necessary for Template:2019–20 Ligue 1 table as per final declared table of Ligue 1:. Chanheigeorge (talk) 16:27, 30 April 2020 (UTC)
 * In the WDL style, use ppg for points per game NHammen (talk) 17:00, 30 April 2020 (UTC)

Wrestling
Hi, I tried to use this for the sport of wrestling, I tried to use current options but I need some help here

Is it possible to hide GF/GA columns as well ? I couldn't find that option. in this sport they never count the number of points against, "points for" is called "Technical points" (TP) but since that's not a tie breaker not necessary to be in the table. also I would like it more if it was possible to see CP instead of Pts but if this is not easy to make that change, I can live with that Pts column, but another request, in some events the first factor is the number of win (actually in most competitions) and CP comes second, but also in some older events CP was the first deciding factor. we have an option to use  |ranking_style=w  but in that case it will hide the Pts/CP column, is it possible to have both columns (W and Pts) but make it optional which one is bold ? thanks in advance. Mohsen1248 (talk) 23:11, 27 April 2020 (UTC)
 * For the first question, there is an easy solution: none. For the rest, it would require either changes to the existing WL style or creating a new style. NHammen (talk) 03:12, 29 April 2020 (UTC)
 * Wait. You can bold wins and still show points, because of the way you are setting points with adjust_points_TTT. If you use w then wins is bolded and points are not shown, as you noted. But, then you can use yes combined with bonus_header. In that case you get:

NHammen (talk) 03:27, 29 April 2020 (UTC)
 * Thanks a lot for your answer, it already answers most of my requests, one last request, as I said in some competitions CP is the first decider (and not the number of wins) is it possible to keep the table exactly as your example but have that CP column in bold ? Mohsen1248 (talk) 04:55, 29 April 2020 (UTC)
 * Not as far as I can see. In this case, you could decide not to use w, and just use the Pts column which would be in bold. But you can't change the header of Pts. That's the only way I see to do it. NHammen (talk) 13:27, 29 April 2020 (UTC)
 * That's OK, I can use Pts (and not CP) for all the tables, thanks for your help. Mohsen1248 (talk) 14:16, 29 April 2020 (UTC)

I just created a new style called Custom. This style allows you to set the number of columns that the table has, and give each one a custom header. That is, it has more customization than the WL or WDL styles, but doesn't calculate as much. This only calculates matches played, points, and points per game. But I think that is more than you need. See below:

If you want to set only one of the columns as bold, just remove the yes or yes as appropriate. NHammen (talk) 21:30, 1 May 2020 (UTC) I haven't written any documentation for this new style yet though, so you'll have to stumble along blindly for a bit if you want to use it right away. NHammen (talk) 21:40, 1 May 2020 (UTC)
 * , thanks a lot, this is great and covers everything, I also can probably use it for other individual sports, I already know good enough to use it myself but having documentation will help others. I'm not really familiar with how things work here, so this is ready for use and I can start using it with the name Custom ? nobody will rename it or something like that later ? Mohsen1248 (talk) 21:44, 1 May 2020 (UTC)
 * I don't see any reason why the name of the style would be changed. But I only started editing Sports table modules a couple of weeks ago, so there are people around who might care a bit more than I do. Which means I can't say for certain that this will not be renamed later. But based on the fact that when the Football style was renamed to WDL, they ensured backwards compatibility with the old name, it stands to reason that even if the name is changed, all tables that use Custom will still work properly. I have a lot of free time due to Coronavirus, so I will probably be adding documentation relatively soon. NHammen (talk) 22:06, 1 May 2020 (UTC)
 * Great, thanks again, I really appreciate your work. Mohsen1248 (talk) 22:30, 1 May 2020 (UTC)
 * So I have written some documentation. There are a few more things I need to add to it, but it's mostly complete. However, I should mention that I have added a new parameter ranking_col which in addition to selecting which column to bold, also sets the column to show any hth notes in. I did this because I saw that no column was showing hth notes. Since you probably didn't define any hth notes in your uses, that still is okay. The parameter yes still works, but it is preferable to use N going forward, so that there will always be a column to show hth notes, if there are any, and to avoid any shenanigans caused by the default value of this new parameter. I did go and edit a few of the pages you had used the module in, just to test it out. NHammen (talk) 20:01, 2 May 2020 (UTC)
 * Thanks, that's even better for the reason you explained. Mohsen1248 (talk) 20:20, 2 May 2020 (UTC)
 * I made necessary adjustments in all articles using this module, so if you want to make any change or even remove that previous option, that won't make any harm. anyway I highly doubt there will be a table with more than column in bold. Mohsen1248 (talk) 20:37, 2 May 2020 (UTC)

In the WDL style, highest_pos and show_gb interact badly
If you use yes but do not define GB_team then GB_team defaults to 1. On line 329 of the WDL style, the following concatenation is used:. However, the team list that is passed to the row function in the style only includes teams between highest_pos and lowest_pos. Therefore, if highest_pos is greater than 1, then  is nil, and a Lua error is thrown indicating that a concatenation with a nil value was attempted. Either  needs a different default value (maybe equal to highest_pos), or some sort of error checking is needed to prevent concatenation with a nil. NHammen (talk) 16:39, 27 May 2020 (UTC)

Screws up if rank doesn't start at #1
Is there a way for this to start on any other ranking save for #1? There are some tournaments were lower seeded teams compete separately from higher seeded teams. Or maybe I'm doing it wrong? — Preceding unsigned comment added by Howard the Duck (talk • contribs) 12:16, 23 May 2020 (UTC)
 * There are a couple of ways of handling this.
 * Option 1: define all teams but use highest_pos:


 * Option 2: define only the needed teams and use pos_XXX:


 * Note that if you do both, bad things will happen. NHammen (talk) 16:24, 27 May 2020 (UTC)
 * Copy that. Thanks! Howard the Duck (talk) 17:05, 27 May 2020 (UTC)

Requested move 17 May 2020

 * The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion. 

The result of the move request was: Moved to Module:Sports table/styledoc as suggested &mdash; Martin (MSGJ · talk) 21:19, 27 May 2020 (UTC)

– The current title of this page makes absolutely zero sense; docuementation pages don't themselves need documentation * Pppery * it has begun... 17:36, 17 May 2020 (UTC)
 * Module:Sports table/doc/doc → ?
 * I would move it to Module:Sports table/styledoc or something that indicates that it is used by the various style pages. the key is to make sure it's not parsed as lua code. Frietjes (talk) 21:03, 17 May 2020 (UTC)
 * Having wikitext pages in the Module namespace without the  subpage has been supported for years (although attempting to execute this move will trigger a warn-only edit filter, since the behavior could easily be surprising if you don't understand it). * Pppery * it has begun...  17:47, 24 May 2020 (UTC)


 * The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

PPG and Points
Is there a way for Module:Sports_table/WDL to show the teams' total points alongside their Points Per Game, if a league was decided by the latter?

The current code is messy and seems to insert PPG and just gets rid of Points. How can we show them both together? They're both important information in any football table. - Demokra (talk) 03:17, 6 June 2020 (UTC)


 * I agree that we need both PPG and points in football tables for seasons cancelled by the pandemic that were resolved by PPG. I've mentioned this thread on a relevant thread at Wikipedia talk:WikiProject Football. Kahastok talk 11:04, 6 June 2020 (UTC)
 * I've added a ppgpts option. I made the change in the module WDL subpage without using a sandbox because I couldn't see how to use an appropriate sandbox, but I don't see how the changes will affect anything else. Please revert if you see any problems. —  Jts1882 &#124; talk 12:52, 6 June 2020 (UTC)
 * Thanks, Jts – the PPGPTS looks good so far. - Demokra (talk) 21:45, 6 June 2020 (UTC)


 * There is a minor issue that head to head notes are displayed in both columns, which seems a bit odd to me. But its better than not having the option at all. NHammen (talk) 22:05, 6 June 2020 (UTC)

"Matches with background in a lighter colour were decided after overtime."
Can there be an option for U.S. spelling of "color", or use a different word altogether? Howard the Duck (talk) 13:48, 6 July 2020 (UTC)
 * That text is in Module:Sports results. It can also display "Colours: ". PrimeHunter (talk) 15:47, 6 July 2020 (UTC)
 * Oops let me post that there... Howard the Duck (talk) 15:50, 6 July 2020 (UTC)

extra space in transclusion
I am transcluding 2022 FIFA World Cup qualification – AFC Second Round in 2020–21 in Indian football. But I am getting extra linebreaks above and below the table. I verified in the original page, but I don't see such linebreaks there. Not sure what's causing it. Can anyone help? Coderzombie (talk) 16:48, 2 July 2020 (UTC)
 * This was unrelated to the module. Smartyllama placed a bunch of newlines inside  in the article.[//en.wikipedia.org/w/index.php?title=2022_FIFA_World_Cup_qualification_%E2%80%93_AFC_Second_Round&diff=964480805&oldid=964365427] I have removed them.[//en.wikipedia.org/w/index.php?title=2022_FIFA_World_Cup_qualification_%E2%80%93_AFC_Second_Round&diff=965666574&oldid=965653759] It also caused unwanted whitespace in other articles. PrimeHunter (talk) 18:04, 2 July 2020 (UTC)
 * Huh, not really sure how I did that. I certainly wasn't trying to. My apologies. I was trying to delete the word "originally" as unnecessary but somehow did a whole lot more. Smartyllama (talk) 18:27, 2 July 2020 (UTC)
 * I can reproduce it with VisualEditor. It often makes unwanted changes with no editor action. PrimeHunter (talk) 18:45, 2 July 2020 (UTC)
 * Thank you! I removed extra spaces in Group E, but didn't know extra spaces in other sections would also affect it. Coderzombie (talk) 02:53, 3 July 2020 (UTC)
 * It's a confusing scenario. The code  transcludes everything inside  in 2022 FIFA World Cup qualification – AFC Second Round.   is not a MediaWiki feature and does not refer to the article section 2022 FIFA World Cup qualification – AFC Second Round.   is just a parameter value like in templates, and the transcluded page decides what to do with the parameter. In this case, each onlyinclude block is of form   or another group name. When Module:Sports table is used on an article which is itself transcluded somewhere else, it is coded to only output anything when the transclusion has a matching  . So each of the other onlyinclude blocks output nothing from the module itself at 2020–21 in Indian football. But after [//en.wikipedia.org/w/index.php?title=2022_FIFA_World_Cup_qualification_%E2%80%93_AFC_Second_Round&diff=964480805&oldid=964365427] they each output the newline VisualEditor added after the module call but inside . PrimeHunter (talk) 12:24, 3 July 2020 (UTC)
 * That's a wonderful explanation. But as these templates get more and more complex, these issues will get tougher to handle to naive users. Coderzombie (talk) 14:13, 6 July 2020 (UTC)
 * you can also wrap the content in trim, but removing the newlines is the better approach. Frietjes (talk) 17:20, 14 July 2020 (UTC)

Custom columns
Is there an easy way on adding additional columns aside from switching to Custom? Howard the Duck (talk) 15:14, 14 July 2020 (UTC)
 * Howard the Duck, what column to you want to add? Frietjes (talk) 17:18, 14 July 2020 (UTC)
 * It's to show the record of the team in that particular stage of the tournament; the other parts of the table show its overall record. Howard the Duck (talk) 17:27, 14 July 2020 (UTC)
 * Howard the Duck, do you have an example? Frietjes (talk) 18:10, 14 July 2020 (UTC)
 * 2012 PBA Governors' Cup. I used 2 tables in here, but could've used just one with an extra column for the teams' semifinal round record. Howard the Duck (talk) 18:15, 14 July 2020 (UTC)
 * I tried doing this using Custom version, but I can't since it doesn't allow you to calculating by winning percentage, just points. I'd suggest allowing that functionality... or allow adding extra columns in the WL version, just in case those US leagues start using this module. Howard the Duck (talk) 18:39, 14 July 2020 (UTC)

Floating tables and moving the source to the title
Per request at 1993 Football League First Division play-off Final, I have added two more features. (1) if you use left or right it essentially uses stack begin and stack end to float the table to the left or right. (2) if you use title and title_source then a source is appended to the title, and the source in the footer is no longer required. I will work on updating the documentation. please let me know if I broke something. Frietjes (talk) 17:18, 14 July 2020 (UTC)
 * I also added an optional 1 for WDL style, which _should_ do nothing if omitted, but otherwise pads under 10 by one 0. to have the module first scan the columns to determine the alignment would require a lot more work (two passes), but this seems to work in many cases where it's wanted.  if this addition is controversial, I will remove it. Frietjes (talk) 18:22, 15 July 2020 (UTC)

How about center as an option as well? —Anomalocaris (talk) 17:19, 2 October 2020 (UTC)

Lua error
Am I the only one who gets "lua error"? For me, the templates work in 2022 FIFA World Cup qualification, but not in 2022 FIFA World Cup qualification (UEFA), In the later link I get the error message "Lua error: bad argument #1 to 'formatDate' (NaN)". I also tested in incognito mode (google chrome), then the templates work as they should. Did I miss a setting? This makes me so confused. DenSportgladeSkåningen (talk) 19:34, 24 November 2020 (UTC)


 * Yes I am receiving the same issue, that too on different browsers. Maybe someone has changed something up.--Anbans 585 (talk) 20:53, 24 November 2020 (UTC)


 * It seems to occur when a team in the table has yet to play a match, i.e. their record is 0-0-0. Once every team in the table has at least one win, draw or loss it no longer gets the Lua error. I have no idea why this error happens all of a sudden, but that seems to be what triggers it. QQ2NFLD (talk) 05:50, 25 November 2020 (UTC)
 * Pinging, who might be able to troubleshoot this. – Jonesey95 (talk) 06:22, 25 November 2020 (UTC)
 * Same issue with 2020–21 Indian Super League season  Saha ❯❯❯ <b style="color:#0043AF"> Stay safe  </b> </b> 08:51, 25 November 2020 (UTC)
 * 2020–21 A-League as well fyi. WDM10 (talk) 09:34, 25 November 2020 (UTC)
 * Now the template does not work at all for me, not even if I go into incognito mode. DenSportgladeSkåningen (talk) 10:40, 25 November 2020 (UTC)
 * Also getting this error but only for tables where no team has played a match yet, otherwise it's working normally. Ben5218 (talk) 13:39, 25 November 2020 (UTC)
 * should be fixed now. Frietjes (talk) 15:04, 25 November 2020 (UTC)
 * Can confirm that the error is no longer occurring, good job Frietjes! Ben5218 (talk) 15:21, 25 November 2020 (UTC)
 * All good on the A-League page. Thanks! WDM10 (talk) 21:08, 25 November 2020 (UTC)

Would someone please work out what has to be done to fix: Johnuniq (talk) 06:41, 26 November 2020 (UTC)
 * PoolD BMT 2018 CG
 * 2003 Men's EuroHockey Nations Championship qualification
 * 2014 Men's Junior AHF Cup
 * 2016 Men's EuroHockey Indoor Championship
 * 2017 Men's EuroHockey Indoor Club Cup
 * 2018 Men's EuroHockey Indoor Championship
 * 2018 Men's EuroHockey Indoor Club Cup
 * 2019 Men's Junior AHF Cup
 * 2020 Men's EuroHockey Indoor Championship
 * Johnuniq, done [//en.wikipedia.org/w/index.php?diff=prev&oldid=990786185] [//en.wikipedia.org/w/index.php?diff=prev&oldid=990786425] Frietjes (talk) 14:28, 26 November 2020 (UTC)
 * Beautiful, all cleaned up, thanks. Johnuniq (talk) 22:52, 26 November 2020 (UTC)

Module documentations
Has anyone given a thought about writing /docs to many of the styles listed on the main page (like WLHA, for example), because I have a hard time trying to use styles without reading the /docs or knowing them too well (like WL and WL OTL tiebreaker)? –Piranha249 17:23, 2 January 2021 (UTC)

Minor tweaks wanted
I'm trying to expand tables such as this one by adding an extra column that shows what matches are excluded from the ranking, because that is important information after all. The above basically does the job, but there are a couple more things that I'd like to achieve, namely:


 * The '+' sign should be forced to appear in front of positive goal differences. (Slovakia's goal difference has been made negative on purpose.)
 * The team names in the new column should be aligned left, like the teams ranked are.

Also I'm aware that the "GF" and "GA" column headers can be tooltipped with  and similar, but I was surprised to find out this was not implemented by default.

Can anyone help? --Theurgist (talk) 12:34, 13 January 2021 (UTC)


 * Default tooltips added. I'll see about the other things tomorrow. 2601:2C4:C481:2E0:C8BD:9914:C525:DE5A (talk) 04:29, 31 January 2021 (UTC)
 * I have added a new parameter aligncolN, which you can use in your table with left to get the desired result. 2601:2C4:C481:2E0:1500:99BF:C19A:B707 (talk) 20:33, 31 January 2021 (UTC)
 * And finally I have added a new parameter plus_sign_diffs, which will cause a plus sign to appear in front of positive numbers in a diff column. 2601:2C4:C481:2E0:1500:99BF:C19A:B707 (talk) 00:09, 1 February 2021 (UTC)


 * Thanks a lot! --Theurgist (talk) 20:10, 4 February 2021 (UTC)

use_tie (WDL sub module)
What's the difference between the " <abbr title="Tied">T " (use_tie) and the " <abbr title="Drawn">D " column? If it's only to change the column header, wouldn't the "draw_head_text" parameter be enough? --Sb008 (talk) 09:27, 6 February 2021 (UTC)
 * Sb008, having y is better for consistency and it's much less to type. one could also ask why even have WDL when there is Custom.  for even less typing would could add WTL which would automatically add y similar to how WL sets no. Frietjes (talk) 18:32, 6 February 2021 (UTC)

team_order and highest_pos
Would it be possible to use team_order when highest_pos is set in the module? I had tried this with Template:2020–21 UEFA Nations League B tables, but realised that team_order cannot be used when highest_pos is defined. Thanks, S.A. Julio (talk) 21:54, 7 February 2021 (UTC)
 * S.A. Julio, the problem is that highest_pos may be used by a transcluding page to hide the top teams in the table. to avoid a possible conflict between these two parameters, I have added team_order_start.  the other way to do it is to prepend the team order with a bunch of ",,,,,,,". Frietjes (talk) 16:32, 9 February 2021 (UTC)
 * Great, thank you for the help! S.A. Julio (talk) 23:52, 9 February 2021 (UTC)

Where are the testcases?
I'm trying to make sure I haven't broken anything but the location of the module's test cases is not obvious to me. (I'm doing a couple things; one is apparently making the modules depend directly on navbar rather than going through the template, and the second is moving the 'reflist' class over to a more 'local' name as I am preparing to move reflist out of Common.css soon.)

Is there an actual dedicated set of checks somewhere? It's not particularly nice when one is warned to test in the documentation of the module itself and there aren't test cases. --Izno (talk) 05:34, 3 March 2021 (UTC)


 * And the same question for Module:Sports results. --Izno (talk) 05:42, 3 March 2021 (UTC)

Module being replaced in artices by WikiProject Check Wikipedia tool
Please see this example edit, and this discussion. I don't know if the tool can or will be fixed. It may be best to call this module from a template, per normal practice in articles, to avoid editor confusion and replacement of this module by tools and scripts that think there is an error. Or someone from here may want to try to fix the tool. I don't know. – Jonesey95 (talk) 18:34, 16 December 2020 (UTC)
 * Mostly I think we just need to cognizant. quarry:query/50137 serves to check for 2k additions or larger made by the tool. --Izno (talk) 05:45, 3 March 2021 (UTC)

Second tiebreaker in WL OTL tiebreaker
I propose the addition of a second tiebreaker to account for the addition of new tiebreakers to the NHL in 2019; Regulation wins (RW is now the primary tiebreaker, with Regulation + OT (no shootout) wins (ROW) becoming secondary, followed finally by all wins (W). –Piranha249 16:40, 2 January 2021 (UTC)
 * Is anyone still here? I would love to hear an answer eventually. –Piranha249 (Discuss with me) 19:37, 13 March 2021 (UTC)

Invoking the sandbox
How do I invoke Module:Sports table/WDL/sandbox using Module:Sports table to test a change? Nthep (talk) 16:57, 28 March 2021 (UTC)
 * Nthep, use WDL/sandbox instead of WDL. Frietjes (talk) 14:44, 5 April 2021 (UTC)

Footnote style
When I add a qualifying parameter like  to a table this generates a footnote equivalent to using efn (efn-la). Is it possible to vary the footnote style to allow the use of efn-ua? The reason being that when the module is used in a page or a template it is often desirable to keep the footnotes relating to the table with the table rather than in the article general footnotes. Unless any general footnotes in the article are set to use efn-ua then they get mixed. I know changing the footnote style for an article is an easy option but enforcing it in articles which are likely to be edited by less experienced editors is more difficult that making the swap in the table which is likely to be edited by fewer people. As an example see Super League XXVI where the table is a transcluded template with footnotes and to keep the footnotes from the article appearing in the same notelist the article has to use efn-ua and notelist-ua. Nthep (talk) 17:09, 14 March 2021 (UTC)
 * Further, it seems like this template emits notelist-ua which resets the footnotes for the rest of the article -- expected footnotes defined before this template invocation are reset, leaving them undefined when used later in the article. How can that be prevented? See 2020–21 Atlético Madrid season for the article, and . -- Mikeblas (talk) 03:03, 14 April 2021 (UTC)

Soccer Leagues with Playoffs
Since there are many European leagues with playoffs currently (including the 9th and 10th leagues on UEFA rankings - 2020–21_Belgian_First_Division_A and 2020–21_Austrian_Football_Bundesliga), where the first tiebreaker is actually wether teams points were rounded, there seems to be a need for a new optional column for soccer standing. I suggest adding it as either points without rounding (i.e. 25.5 in the case of Rapid Wien), or just the rounding itself (i.e. -0.5, 0 or 0.5). Currently the solution for these scenarios are very wordy and not approachable for the reader: https://en.wikipedia.org/wiki/2020%E2%80%9321_Austrian_Football_Bundesliga#Championship_round:~:text=The%20points%20obtained%20during%20the%20regular%20season%20were%20halved%20(and%20rounded%20down)%20before%20the%20start%20of%20the%20playoff.%20As%20a%20result%2C%20the%20teams%20started%20with%20the%20following%20points%20before%20the%20playoff%3A%20Red,will%20be%20added%20for%20these%20teams.

SimTheWorld (talk) 15:19, 18 April 2021 (UTC)

Recent edit broke tables?
I noticed that a recent edit to the module has caused various tables to break (e.g., in 2016–17 Serie A, the league table does not display, but rather an error message). I'm not familiar with Lua, and it's template-protected anyway, but this is the message:



Could someone familiar with the module's workings look into this and fix it? ComplexRational (talk) 15:04, 18 May 2021 (UTC)


 * was the last person to edit this module, so maybe they would be able to fix it. I guess it was that change that inadvertently broke the module (as it was working until today). FYI, it's affecting all sports articles with tables in them, so would be good to fix soon if possible. <b style="color:#0033ab">Joseph</b><b style="color:#000000">2302</b> (talk) 15:15, 18 May 2021 (UTC)
 * fixed, sorry about that. Frietjes (talk) 15:20, 18 May 2021 (UTC)

Template-protected edit request on 18 May 2021
Sports table is not working on many football (soccer) season league pages. Under the league table section, the error message

"Lua error in Module:Sports_table at line 572: bad argument #1 to 'insert' (table expected, got string)."

appears and no table is displayed. This is occurring with many league pages such as the Bundesliga, Serie A, and the Premier League. GrahamZC (talk) 15:11, 18 May 2021 (UTC)
 * fixed. Frietjes (talk) 15:23, 18 May 2021 (UTC)

Guidance on forfeitures/defaults/point deductions
I've seen, in 2020–21 EFL Championship for example, that these are dealt with using the  parameter. I thought it was the. Some don't note this at all in the standings table, noting this elsewhere, such as in results tables. Which is right, or it depends per sport/league/tournament? Howard the Duck (talk) 20:40, 19 May 2021 (UTC)
 * I, personally, prefer to use the  because it puts the note by the point total.  but, hth is not the most obvious name for it.  we could have a   or something like that to make it more obvious. Frietjes (talk) 14:42, 20 May 2021 (UTC)
 * We could do that. A  implies it has 1 or more partner, and it's odd to see it being alone (at least when editing via the source, this doesn't change anything for readers). It also resolves issues if the team that had a point deduction is also tied with another team. Howard the Duck (talk) 15:02, 20 May 2021 (UTC)

Winning percentages are actual percentages instead of decimals
Can an option be done for leagues that do this? Howard the Duck (talk) 13:30, 24 June 2021 (UTC)


 * @Howard the Duck if it's a table using WDL then add a parameter notratio will set the display to % not a decimal ratio. See 2021 RFL Women's Super League regular season table for an example. Nthep (talk) 11:55, 25 June 2021 (UTC)
 * This one's using WL. Howard the Duck (talk) 12:39, 25 June 2021 (UTC)
 * Try it anyway. Looking at the code WL utilises the code for WDL but hides draws, so on that basis the pct_style parameter should work. Nthep (talk) 14:08, 25 June 2021 (UTC)
 * Great, it does work. I would've preferred having the percent sign though. As for your example, are the percentages boldfaced/emphasized on league tables on other websites/media? Howard the Duck (talk) 18:36, 25 June 2021 (UTC)
 * I realized there are many ways to present this. Others are in ratios, them round off to the nearest tenths or hundredths. Still others are in decimals and always rounded off to the nearest hundredths, but some have leading zeroes and some do not. I know this can easily be set up by people here but I guess that would be too much customization on something that's ultimately readable by everyone. Howard the Duck (talk) 18:52, 25 June 2021 (UTC)

PPG for WDL OT
Could someone with the expertise please add the function to allow for the option for PPG to be shown for the WDL OT module, as is already possible with the primary WDL module. Thanks in advance. TurboGUY (talk) 05:08, 27 June 2021 (UTC)
 * TurboGUY, should work now, but not fully tested. Frietjes (talk) 16:43, 29 June 2021 (UTC)
 * Many thanks, seems to be working! TurboGUY (talk) 19:09, 29 June 2021 (UTC)

Split table
This championship is 1.5 round, meaning that after the first round the teams are split to promotion and relegation groups. What's the best way to build tables similarly to this? Can I recycle definitions for the final tables, or do I replicate the whole lot? How do I make numbering start from pos.11 for the relegation group? Wolfmartyn (talk) 12:43, 23 August 2021 (UTC)
 * use lowest_pos to set the first number to something other than 1. you do have to copy the team name definitions to the subsequent tables. Frietjes (talk) 17:05, 23 August 2021 (UTC)
 * in fact it was highest_pos, but thanks for your help, it led me to the right path! There's a lot of redundancy in my code, I wonder it is possible to optimize it a bit? Wolfmartyn (talk) 18:31, 24 August 2021 (UTC)
 * one thing to do is that you don't need to include the win_, draw_, loss_ for teams that don't appear in the table. Frietjes (talk) 14:06, 25 August 2021 (UTC)

Remove navbar
Ice hockey at the 2022 Winter Olympics – Men's tournament uses Sports table to produce a table (surrounded by a "section" called AStandings). Canada at the 2022 Winter Olympics then accesses that section using. However it also adds a navbar. I can see the sense in this when the original is in a template but it seems odd when it's in another article. Is there any way to remove this navbar in this situation? (excuse my ignorance of the technical terms) Nigej (talk) 17:31, 9 February 2022 (UTC)

Template edit request
Gramatically, change "Qualified to" to "Qualified for" and "Qualified, but not yet to" to "Qualified, but not yet for" because "qualify for something" is not equal to "qualify to do something." Santiago Claudio (talk) 04:22, 21 June 2022 (UTC)
 * ✅.  P.I. Ellsworth &thinsp;, ed.  put'r there 07:04, 21 June 2022 (UTC)

Winning percentage
Winning percentages can be presented in a variety of ways:


 * 1) Almost all of tables/standings I've seen (NBA, NFL, MLB, NPB, KBO, PBA) do not emphasize (boldface) the winning percentage column. I suggest for this to be removed.
 * 2) Some have different ways on presenting the actual value. The American leagues and NPB present it with no leading zero; the KBO has a leading zero; the PBA uses actual percentages in the hundredths. Perhaps this can be added as a feature.

Howard the Duck (talk) 16:40, 15 July 2022 (UTC)

References in transcluding articles?
This moudle seems very complicated, and I can't sort out how to fix problems it is causing with references in transcluding articles. At the moment, 1988–89 Norwich City F.C. season transcludes the "First Division" section from 1988–89 Football League. This leaves the Norwich City article with an undefined error for the reference "Liverpool-ban".

This reference, however, is defined in the "col_EXEC" parameter in the invocation of this template. It seems like the template will add columns depending on certain results, but the documentation isn't too approachable and I'm not sure how reference definitions can be established to correctly appear in the different configurations that the template might output.

For now, I've worked around this issue by repeating the reference definition in each column. This seems pretty cumbersome, but perhaps it's the only solution for now. What alternative solutions are available? Are there plans to better document this template, make it easier to use (particularly for new users!), or address the referencing issues it regularly causes? -- Mikeblas (talk) 18:05, 28 August 2022 (UTC)

float=center
Why not allow float=center? —Anomalocaris (talk) 20:29, 20 September 2022 (UTC)
 * It's strange, isn't it? float=center is just not a thing, even though it seems like an obvious option. AFAICT, this module calls stack begin to apply floating, and that template applies a CSS class. See the CSS spec for details. – Jonesey95 (talk) 21:04, 20 September 2022 (UTC)

Jonesey95: I asked the question because I edited Draft:2022–23 National Basketball League (England) season, where someone had two of these tables side-by-side with markup like this:

The obvious way to get rid of the obsolete center tags would be to add a  to each call of this module. Of course, that didn't work, so I replaced  with , which actually worked, to my surprise. I realize that "float" carries extra baggage allowing other stuff to display on the non-float side, and for centering, one would typically want nothing to display on either side, so perhaps centering would need to be accomplished with a parameter other than "float". —Anomalocaris (talk) 22:36, 20 September 2022 (UTC)

Possibly ignored parameters
Hi there, I've got a problem with the argcheck function. Everytime we use Sports table on Italian Wikipedia, the article falls into this category for possibly ignored parameters. Why is that? And how can we fix this? Sannita - not just another it.wiki sysop 15:33, 8 February 2023 (UTC)

Matches showing on Sports Table
How to make it show in 2 or more legs? Just like the Two Legs in Sports Results.. Innocence8 (talk) 06:09, 22 November 2022 (UTC)
 * Better late than never. This calls the other one directly, so you can use the 2 option as discussed there. CRwikiCA  <i style="color:navy">talk</i> 20:21, 3 March 2023 (UTC)

"First match(es) will be played on"
For future competitions, there is an option to use the  parameter to list when the first match will take place. While the exact day may often be known, occasionally only the month has been confirmed. However, if only the month and the year are listed in this parameter, the wording becomes awkward, for example at 2024 CONCACAF W Gold Cup: First match(es) will be played on February 2024. Is there any way if only the month and year are listed in this parameter, that the wording is adjusted to "First match(es) will be played in [month] [year]"? Thanks, S.A. Julio (talk) 12:57, 13 March 2023 (UTC)
 * S.A. Julio, fixed. Frietjes (talk) 16:11, 13 March 2023 (UTC)
 * Great, thanks! S.A. Julio (talk) 18:17, 13 March 2023 (UTC)

Edit link when transcluding from page
When you use the module on a page, you can use article_section to link to the specific section specific section on the source page (V), or the talk page (T), the edit link includes a #Section under the (E), which does not edit the specific section, but the whole page instead. Are there any browser/platform settings that this is supposed to work/not work for? I think you have been relatively active in dev for this lately. My worry is that a non-specific edit link does more harm than good, I for one would prefer to link to the section through V, and hit the section edit link on the article, rather than change a sports table with a preview of the whole page. CRwikiCA <i style="color:navy">talk</i> 20:27, 9 March 2023 (UTC)
 * , it may be possible to engineer something where the VTE goes to the article section, but that would require the module to (1) read the page containing the module, and (2) count the sections to get the section number. my concern is that may be expensive string processing.  as far as the article_section is concerned, I don't think it is used very frequently.[//en.wikipedia.org/w/index.php?go=Go&search=hastemplate%3AModule%3ASports_table+insource%3A%2Farticle_section%2F&title=Special%3ASearch&ns0=1]  before, people were using template_name to hack a #Section for the view, with the difference now that the base part of the link is automatically determined.  I believe you are suggesting to just omit the edit link when article_section is used, and scrub the #Section from the talk?  Frietjes (talk) 21:43, 9 March 2023 (UTC)
 * , I couldn't find a straightforward fix, e.g., there is no WP:MAGIC for the section number from the section name. I understand that article_section nor section are always used, but from experience I know defining stuff like this explicitly prevents some nasty to find bugs for users (like when there is multiple tables on a source page). The talk page already links correctly (there is no section link), but for editing, I don't know what is best to do, the result is the same whether you use #Section or not, you get to the full page edit anyway. The only better alternative would be to get the section number, but that's only realistic if there is an existing way to get that. CRwikiCA  <i style="color:navy">talk</i> 22:26, 9 March 2023 (UTC)
 * , it is technically possible for the module to read the page and figure out which section number to use (for example see Module:Calendar TOC). however, it may result in performance limits for large pages. Frietjes (talk) 23:41, 9 March 2023 (UTC)
 * some of these pages are heavily used and shouldn't be slowed down for such a minor reason. Maybe the best thing is to leave it as it is for now. CRwikiCA  <i style="color:navy">talk</i> 02:30, 10 March 2023 (UTC)
 * , sounds good. one thing we could do would be to add say   to the table if SECTION is used, and then automatically create an anchor link for the view button.  that would cost basically nothing and eliminate the need for article_section. Frietjes (talk) 16:23, 10 March 2023 (UTC)
 * What would this generate, especially if article_section and section are different? CRwikiCA  <i style="color:navy">talk</i> 17:55, 10 March 2023 (UTC)
 * , I don't think you need article_section at all. the module would add the id to table, which would allow the anchor link to work.  the anchor link would then send you to the table.  Frietjes (talk) 18:00, 10 March 2023 (UTC)
 * Okay, then I think that would be all that we need. I don't think the section is included in the current documentation, but I think it would be best practice to use it explicitly. CRwikiCA  <i style="color:navy">talk</i> 04:22, 11 March 2023 (UTC)
 * , now added, and tested with Field hockey at the 2020 Summer Olympics – Men's tournament. Frietjes (talk) 16:14, 13 March 2023 (UTC)
 * , great work! CRwikiCA  <i style="color:navy">talk</i> 17:21, 13 March 2023 (UTC)

Error for other sections
I tried using this for the tables in UEFA Euro 1980 on the group pages. Although this worked (see edit history), it caused the pre-existing LST transclusion of the match results to break (show nothing) in the main article. Do you have any idea what is going on? CRwikiCA <i style="color:navy">talk</i> 16:41, 27 March 2023 (UTC)
 * , you have to be careful when mixing WP:LST with <onlyinclude ></onlyinclude>. basically, if you add <onlyinclude ></onlyinclude> to a page, then any   or   will only read what is inside the <onlyinclude ></onlyinclude>.  to fix this, you have two choices: (1) don't use <onlyinclude ></onlyinclude> and instead wrap the table in <section ></section> or (2) switch the <section ></section> to use the Module:Transcludable section syntax.  for an example of the Module:Transcludable section syntax, see links to that module. Frietjes (talk) 16:50, 27 March 2023 (UTC)
 * , I will play around with that, thanks! CRwikiCA  <i style="color:navy">talk</i> 16:57, 27 March 2023 (UTC)

Rugby bonus points
Wanted to see if this could be used for rugby tables but couldn't find much mention of it in the talk archives or examples of it being used in wiki articles.

I can use |winpoints=4, |drawpoints=2 to fix the points awarded, and |for_against_style=points to change the goals columns to points.

But the main thing missing is the columns for bonus points - "Try Bonus (TB)" / |tb_AAA (for scoring four or more tries) and "Losing Bonus (LB)" / |lb_AAA (for being with 7 points after losing a match). Sometimes these are combined into a single bonus column (could use |bonus_combined for that) but generally they are displayed separately.

Is it possible for someone to code |tb_AAA, |lb_AAA, and |bonus_combined into this module? Boothy m (talk) 14:31, 28 April 2023 (UTC)


 * @Boothy m have a look at 2022–23 Top 14 Table and its use of the option which I think does what you want, albeit with bonus points combined into one column. Nthep (talk) 14:39, 28 April 2023 (UTC)
 * Thanks, that looks useful. Would of course still be good to have the additional parameters to avoid all the custom ones :) Boothy m (talk) 15:23, 28 April 2023 (UTC)
 * Hmm, unfortunately looks like you can't add three custom columns together, for example "| colstyle10=sum_points_col8_col9" doesn't work so the separate try and losing bonus columns can't be implemented using the Top14 table. Boothy m (talk) 15:54, 28 April 2023 (UTC)
 * Boothy m, have you looked at Module:Sports table/Rugby? if yes then tbp_XXX and lbp_XXX both work, see here for an example. Frietjes (talk) 21:18, 9 May 2023 (UTC)
 * @Frietjes no but I have now - can't see it listed on the Module:Sports table page so didn't know it existed! Seems to work well though, thanks. Boothy m (talk) 22:55, 9 May 2023 (UTC)
 * Great, I have added it to the list. Frietjes (talk) 00:12, 10 May 2023 (UTC)

Turning off source and status footnotes
Is there any option to turn off the source and status footnotes for a particular table? This would be especially convenient for two tables placed one directly under the other, as such footnotes are otherwise unnecessarily repeated as exemplified below. If not, I would like to see the option to turn them off added.

— AFC Vixen 🦊 19:50, 6 June 2023 (UTC)
 * AFC Vixen, you need three parameters to turn these all off (your example updated above), but we could probably make a single parameter that triggers all three. Frietjes (talk) 21:41, 6 June 2023 (UTC)
 * This seems to disable statuses altogether, which is unideal. I'd like to have just the text at the bottom be disabled, yet still have "(Q)", "(C)", ect. show up in the table itself. Otherwise, a single-parameter solution to disable all footnotes for a table would be appreciated. — AFC Vixen 🦊 22:23, 6 June 2023 (UTC)
 * AFC Vixen, right, I have added an optional y and updated the example above. Frietjes (talk) 16:50, 7 June 2023 (UTC)

WL has a point scored as default for a loss
I noticed that the WL style by default currently awards one point for al loss. Is there any logical reason for this? In almost any sport I know a loss equals no points. Tvx1 15:28, 21 June 2023 (UTC)
 * User:Tvx1, Module:Sports table/WL is a wrapper for Module:Sports_table/WDL with no, but the default value for losspoints has been 1 since CRwikiCA created it back in 2015. examples of sports with 1 loss point include Basketball at the 1968 Summer Olympics. we could change it, but that would require checking (and possibly changing) all of the pages using it first.  but, many of the pages using it aren't using the points, so it might not be that bad. Frietjes (talk) 20:45, 21 June 2023 (UTC)
 * I did certainly expect there to be some sport that yields a point for a loss, but I strongly doubt that's the most common situation. Anyway, this nuisance can always be dealt with with  parameter. Thanks for your reply. Tvx1 22:19, 21 June 2023 (UTC)

Try difference
For Module:Sports table/Rugby, would an editor please make a "try difference" column that automatically sums the inputs for tries for and against? I would also like to see a function to show/hide that column, the points for column and points against column. Thanks! — AFC Vixen 🦊 15:31, 24 June 2023 (UTC)
 * okay, done. Frietjes (talk) 15:46, 13 July 2023 (UTC)

For_against_style
I was wondering whether the for_against_style or their headers could be made to be more customizable? Currently you can only make a basic change from goals to points, but many sports use different parameters like sets, games, frames, racks or legs in their classifications.Tvx1 15:37, 21 June 2023 (UTC)
 * User:Tvx1, see WDL which supports goals, frames, matches, games, points, sets, and runs. however, not all styles support all these options. Frietjes (talk) 20:40, 21 June 2023 (UTC)
 * Ah I see, that wasn't quite clear from the documentation. And I had to stumble on sport which uses something else, legs, of course. Typical me. Anyway, I was already able to create the tables I needed using the custom style. Thanks anyway. Tvx1 22:22, 21 June 2023 (UTC)
 * I added  and simplified the darts example. Frietjes (talk) 16:01, 13 July 2023 (UTC)

Problems with rugby
Two problems are currently plaguing Module:Sports table/Rugby. Firstly, the module fails to add the value of, the total bonus points, to the Pts column. Secondly, the table resets to 3 points for a win and 1 point for a draw, instead of 4 points for a win and 2 points for a draw, when  is active. Some examples of what's happening:

, ,  ,   ,

— AFC Vixen 🦊 16:32, 24 June 2023 (UTC)


 * Pinging, since you seem experienced with this template. — AFC Vixen 🦊 19:17, 9 July 2023 (UTC)
 * okay, now fixed. Frietjes (talk) 15:23, 13 July 2023 (UTC)
 * Thank you very, very much! Your work is very much appreciated. — AFC Vixen 🦊 06:22, 14 July 2023 (UTC)

Is there a way to create a version of this template that uses the word "games"?
I note the footer that refers to the standings being updated through "match(es)" played on a particular date. I know that word is common in soccer parlance. It's less common as to various other sports. What prompts me to raise the issue is the new 2023 NBA In-Season Tournament, which will (uniquely for North American pro sports leagues) use a group stage. A version of this template is therefore in use in that article, but it uses the word "match(es)" and I'm trying to figure out how to change it to the more-appropriate word "game(s)." If anyone can explain what to do, I would appreciate the help! Thanks in advance. 1995hoo (talk) 21:46, 14 July 2023 (UTC)


 * Yeah, U.S. leagues use "games" instead of "matches". Yes "matches" can be perfectly understood, but "games" are more natural. See for example "Games behind". Howard the Duck (talk) 11:33, 15 July 2023 (UTC)
 * The functionality is already there. There's a parameter called matches_text which defaults to matches, just set it to  and it will solve the issue for you. Nthep (talk) 11:51, 15 July 2023 (UTC)
 * Thanks very much! That indeed did the job. Much appreciated. 1995hoo (talk) 18:44, 15 July 2023 (UTC)

Status codes in WDL
I propose changing the status_code values C='Champion', G='Guest', H='Host'& O='Play-off winner' to the plurals Champions, Guests, Hosts & Play-off winners as the module is more often used with teams/nations and not individuals. When talking about teams, it is more common to use the plural than the singular values. Nthep (talk) 15:53, 8 August 2023 (UTC)
 * No comments received, so change made. Nthep (talk) 11:37, 6 September 2023 (UTC)

Altering point total for one team
A single team in a league of nine teams was issued a six point reduction to their season point total as the result of not filing required paperwork for an international import player. The team's number of wins was not altered. Is there a way to edit only that team's point total, while continuing the use the standard module for the other eight teams? For context, this question is specific to the sports table at 2023–24 Naisten Liiga season. Spitzmauskc (talk) 16:14, 21 September 2023 (UTC)


 * @Spitzmauskc yes. There's a parameter adjust_points_XXX you can use to add or delete points to a teams total. Just replace XXX with the relevant team code. See 2018 RFL League 1 regular season table for an example. Nthep (talk) 16:48, 21 September 2023 (UTC)

Remove bolding of winning percentages column for PCT version
AFAIK, none of the WP:RS do this. Howard the Duck (talk) 19:30, 23 October 2023 (UTC)

The template_name parameter
In almost all cases, the template_name parameter is not needed since the module knows the name of the parent, so edits like this one are pointless. Frietjes (talk) 16:10, 21 November 2023 (UTC)


 * I just put it back because without it some tables in articles like this won't show up properly. Mediocre Legacy (talk) 19:01, 21 November 2023 (UTC)
 * no idea what you are talking about, the UEFA Euro 2012 tables in that article are showing up just fine. Frietjes (talk) 22:24, 21 November 2023 (UTC)

What's the difference between status letters "A" and "Q"?
And "T" as well. Presumably "Q" and "T" should be together, but never "A" and "T". Is that right? Howard the Duck (talk) 22:43, 7 January 2024 (UTC)


 * Fairly semantic between A and Q. The next match might not be another round but could be another tournament altogether. T is for when you know the team have qualified for something but not sure what.  For example, rugby league in the UK has post-season play-offs. The stage at which a club might start the play-offs depends on where they finish in the regular season. T is the status used when we know they will definitely make the play-offs but, as yet, not sure which bit of it they will start at. Nthep (talk) 17:24, 8 January 2024 (UTC)
 * I reason I asked this is there's a dispute on what to use between A and Q. I'd argue that if there's a T, Q should be exclusively used, and if there's no confusion on what the "next round" should be, use A. Howard the Duck (talk) 23:01, 8 January 2024 (UTC)
 * That sounds context specific and not something where there is a 100% definite answer. Nthep (talk) 07:56, 9 January 2024 (UTC)
 * Okay; there should be guidance on this. FWIW, I've noticed that A is used if all teams are competing for the same set of berths on the next round (like FIFA World Cup teams in the group stages all gunning for a knockout stage berth), while Q and T if there are several types of berths, or if some teams wins byes or has an easier path to the title, or advance to a more prestigious competition based on its seeding (like in the UEFA Champions League where a team can advance to the knockout stage, to the Europa League, or be eliminated altogether).
 * This is not always clear-cut and there it should be distinguished when we should use Q/T and A. Howard the Duck (talk) 22:17, 9 January 2024 (UTC)