Template talk:Table of Tunisian municipalities

Latest comment: 2 years ago by ಮಲ್ನಾಡಾಚ್ ಕೊಂಕ್ಣೊ in topic Lint errors stemming from this template
WikiProject iconAfrica: Tunisia Template‑class
WikiProject iconThis template is within the scope of WikiProject Africa, a collaborative effort to improve the coverage of Africa 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.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.
Taskforce icon
This template is supported by WikiProject Tunisia.

Lint errors stemming from this template edit

Whatever changed in the 2019-12-21 edits (which are over my head), it's trickling down as broken table tags in the articles that use this template. Can someone with more knowledge than I have take a look? pauli133 (talk) 12:27, 23 December 2019 (UTC)Reply

There are 21 ____ Governorate pages that transclude a section of this template. Most of them "expect" this template to supply column headings. However, Jendouba Governorate tries to supply its own column headings.

@Jonesey95: Your edit of 19:47, 18 September 2018‎ removed table headings, so articles such as Kairouan Governorate, Ariana Governorate, Bizerte Governorate, etc. display something like "The following nnn municipalities are located in ____ Governorate:", followed by a table of municipalities, lacking column headers.

@PrimeHunter: Your edit of 16:49, 21 December 2019‎ reverted Jonesey95's edit and two minutes later you edited this template again, and still, articles such as Kairouan Governorate, Ariana Governorate, Bizerte Governorate, etc. display something like "The following nnn municipalities are located in ____ Governorate:", followed by a table of municipalities, lacking column headers. But Jendouba Governorate, which tries to supply its own column headings, has Table tag that should be deleted and a stripped <table> tag lint errors; so does Tunis Governorate, which can be trivially fixed as the table tags there are superfluous and don't even try to bring in column headings.

It may be that the only way to do this right is to go back to Jonesey95's version here and insert the table headings into each ____ Governorate article individually, but others may understand this better than I. Happy holidays! —Anomalocaris (talk) 21:00, 25 December 2019 (UTC)Reply

I have restored the 2017 version with the (probably erroneous) "fostered content" error message. I added a comment to the wikicode asking editors not to try to "fix" it. As far as I can tell, there are no Linter errors when the template sections are transcluded. We have many templates that show Linter errors (and CS1 errors, and other types of errors) that work fine when they are transcluded. – Jonesey95 (talk) 18:40, 26 December 2019 (UTC)Reply

@Jonesey95, Anomalocaris, and PrimeHunter: I found a workaround to remove fostered content error from this page without causing problems in articles. Since the error was only in this template page and not in articles, I replaced onlyinclude tag with includeonly. Linter was showing error because the section tags were outside table header, row or cell. So I duplicated the table inside noinclude, without section tags, for display in template page. Linter is no longer showing error in page and articles seem fine too. ಮಲ್ನಾಡಾಚ್ ಕೊಂಕ್ಣೊ (talk) 07:28, 24 July 2021 (UTC)Reply

Actually there was a much simpler way to removed fostered content error from the page. We just have to move the section tags to the preceding th/tr/td instead of new lines. I have made the change to template. ಮಲ್ನಾಡಾಚ್ ಕೊಂಕ್ಣೊ (talk) 11:49, 5 September 2021 (UTC)Reply