Wikipedia talk:Template namespace

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

WikiProject iconTemplates
WikiProject iconThis page is within the scope of WikiProject Templates, a group dedicated to improving the maintenance of Wikipedia's templates. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.

RfC on templates storing data[edit]

The following discussion is an archived record of a request for comment. Please do not modify it. No further edits should be made to this discussion. A summary of the conclusions reached follows.
The majority of the participants felt that it either was acceptable to store data in the template space or that it should be dealt with on a case by case basis; with no outright consensus for "yes, all data templates must be kept", the status quo of dealing with potentially problematic templates via the TFD process shall be maintained. Primefac (talk) 23:29, 20 April 2019 (UTC)[reply]

Is storing data an acceptable use of template namespace? {{3x|p}}ery (talk) 23:35, 15 March 2019 (UTC)[reply]

Background: Zackmann08 has recently nominated a large number of templates that are used to store multiple pieces of data, each intended to be used on only one article, for deletion. These have ended in inconsistent results:

  1. Wikipedia:Templates_for_discussion/Log/2019_February_15#Template:Metadata_population_AT-9 closed as delete
  2. Wikipedia:Templates_for_discussion/Log/2019_February_22#Metadata_population_AT_templates closed as delete (although this was kind of a fait accompli since the templates had been orphaned during the discussion).
  3. And there are many currently open, often with the !votes heading in opposite directions despite the arguments for keeping v. deleting generally being the same.

Feel free to tweak the above list. Thus, I am presenting this issue to a wider discussion. {{3x|p}}ery (talk) 23:35, 15 March 2019 (UTC)[reply]

Survey[edit]

  • No it is not The below is copied from the most recent TFD I started and I think really lays out the arguments.
Storing data in a template like this creates a number of problems.
1) Ease of access What this means is that if a user wants to update the information (say for example the population), rather than editing the page, just like every other article on Wikipedia, they have to track down the sub template that is being called and then understand how the switch statement works and find the right value to change. For those of us experience with template editing, this is no problem. But Wikipedia is meant to be open for anyone to use. Storing data in this way just makes it more difficult to update.
2) Outdated references with invalid dates If right now I update the value of Imatra's population, I have to update it on {{Infobox Finnish municipality/population count}}. First, lets assume I am using the same reference as the one that is provided. Well now my access date needs to be updated to today's date. But I'm only updating one value... If I change the reference, I am saying that ALL the values are current as of today's date. But that isn't the case, I'm only updating one value. Furthermore, what if I'm using a different source? I am locked in to using the same source as every other value on the page because that is the source that is being returned by the template.
3) Dangerous precedent Additionally this sets a dangerous precedent. Should we next create a {{Chembox/boiling point}} that contains a massive switch statement with the boiling point of every chemical? Or {{Infobox NFL team/coach}} with a switch statement containing the current coach of every NFL team? That isn't how this works. If you want to change the data, you change it on the article in question.
4) Performance issues With the current implementation of 20 different subtemplates, that means that any time one of these articles loads, it has to parse 20 different switch statements. In somecases, because of the way the error handing is written, the switch statements are parsed multiple times. All to return plaintext numbers or references that can and should be included directly on the page.
The only reason I have heard for keeping these templates is that it makes it easier to update. Well that is just false. It may make it easier to BULK update, but how often are you updating EVERY value in one go? Rarely... And if it needs to be done, WP:BOTs are your answer for bulk updating pages. --Zackmann (Talk to me/What I been doing) 23:37, 15 March 2019 (UTC)[reply]
If thousands of boiling points or NFL coaches were changed at least once a year on the same day by the same organization, probably we would have a meta template for them. --eh bien mon prince (talk) 00:51, 16 March 2019 (UTC)[reply]
Underlying lk, read that as boiling points of NFL coaches. cygnis insignis 10:52, 16 March 2019 (UTC)[reply]
  • No For the same reason that single-use templates are generally deleted. {{3x|p}}ery (talk) 23:43, 15 March 2019 (UTC)[reply]
  • More examples are needed to form a general consensus. I recall seeing some census/statistics information that came from a few reliable sources and which was stored in a template (or was it a module?). Each article used a code (from the RS) to identify which set of data was needed. It worked well and was much easier to verify because all the information was in one place. In particular, it was much easier to update the information when changes occurred because the changes came from one RS and were made in one template/module. Sorry I can't find an example at the moment but it might have been something to do with Swiss settlements. Johnuniq (talk) 00:04, 16 March 2019 (UTC)[reply]
  • (edit conflict) Pinging users who participated in any of the TfDs about this issue: @Apalsola, Markussep, Underlying lk, Scope creep, Darwinek, Pigsonthewing, Tom (LT), Keith Edkins, Number 57, Michael Bednarek, Nyttend, SPQRobin, Kusma, RexxS, Uanfala, and Gonnym: (apologies if I missed anyone). {{3x|p}}ery (talk) 00:10, 16 March 2019 (UTC)[reply]
  • Yes. Take any series of related articles, e.g. the ones in Category:Nations at the 1992 Winter Olympics. Imagine that the Olympics wikiproject decided that it would be useful for all of these articles to have a template with some of that year's final medal counts. What would be wrong with that idea? It's raw data (see full form at 1992 Winter Olympics medal table), and it would seemingly be beneficial to include in all the articles in question. The opposing arguments demonstrate potential problems with storing data in certain circumstances, but saying "it's not always a good idea to do this" is very different from "it's never a good idea to do this". Dump the bathwater and keep the baby. Nyttend (talk) 00:27, 16 March 2019 (UTC)[reply]
    Nyttend, see but the example you highlighted is very different... A formatted table that is used in multiple places is a perfect use of a template. I don't think anyone is suggesting elimination of {{Medals table}} templates. What we are talking about is purely raw data where a massive switch statement returns a number. Zackmann (Talk to me/What I been doing) 03:14, 16 March 2019 (UTC)[reply]
    No, what you're talking about is using the template namespace to store data. See no true Scotsman and don't try to redefine the proposal in your favor. Nyttend (talk) 03:30, 16 March 2019 (UTC)[reply]
    There's no "no true Scotsman" here; I was never intending to include the kind of template you are talking about (although I think it merits deletion for an unrelated reason). {{3x|p}}ery (talk) 03:32, 16 March 2019 (UTC)[reply]
    Sorry, I misremembered the meaning and was attempting to switch it to Moving the goalposts when I edit-conflicted with you. The point is that you can't propose one thing and then get claim that you proposed something else when the absurdity of your proposal is demonstrated. Nyttend (talk) 03:34, 16 March 2019 (UTC)[reply]
  • Yes. The RfC asks if it is acceptable, and it certainly is, most of those templates have been around for nearly a decade. The objection regarding the difficulty of updating an individual entry within them is beside the point: when statistical offices publish updated population figures (which can happen quarterly in some countries) you will want to update all of the entries. It is a tedious and largely uncontroversial task, which is why it is accepted to forsake some ease of access in order to make the update process more manageable. In many cases there might be better way to achieve the same result (such as using Wikidata for storing statistics), but that hardly means that meta templates are somehow now unacceptable.--eh bien mon prince (talk) 00:39, 16 March 2019 (UTC)[reply]
  • Yes Templates like {{Israel populations}} are extremely useful ways of keeping hundreds of articles easily and consistently updated, whilst ones like {{English football updater}} ensure that the style of presentation is consistent, and helps ensure all articles do get updated (before this was introduced, numerous articles weren't being updated every season). Getting rid of data templates like these would be madness, and I think the rationales opposing them above are heavily flawed. Firstly. templates like Israel populations are updated in one go, once a year when the new population figures are released. Secondly, the outdated references bit can be easily resolved by having a requirement that all entries are updated in one go (and putting them on template protection to prevent drive-by editing). Thirdly, these aren't setting a dangerous precedent; in some cases they're useful, in others not – if editors feel they're not useful, then they can be taken to TfD or discussed at the relevant WikiProject. I also disagree that these are complex to edit – they're far simpler that trying to complete something like {{cite}}, and even if they were more complex, actually in many cases these are things that we probably wouldn't want drive-by editors updating in most cases. Number 57 00:48, 16 March 2019 (UTC)[reply]
    Number 57 & Underlying lk you both make good points. I don't agree 100% but I do respect the way you presented the argument. Can I ask, what say you to things like {{Infobox Finnish municipality/land area}} I don't see that being updated all that often (seems more like my NFL coaches example?). Now with {{Infobox Finnish municipality/population count}} I totally get where you are coming from. I take a different stance on it, but I can at least understand where you are coming from! But with something like land area, total area, etc. Why the need to update those constantly. I would think those would be pretty darn static. Additionally, population density should be automatically calculated. I'm going to repost this comment at that specific TFD for more discussion there... Zackmann (Talk to me/What I been doing) 03:20, 16 March 2019 (UTC)[reply]
    It's not inconceivable for areas to need to be updated: for example in the case of administrative reorganisations. But ease of updating is only one among several advantages of storing this data inside a template. Another advantage is that it makes the data more secure: if it's stored inside the complicated template machinery it's much more difficult for disruptive editors to tamper with it than if the data were in the article or on wikidata, and it's also much easier to keep an eye out for such tampering: watchlisting a single template page is better than having to watch hundreds, oftentimes regularly edited articles for such changes. – Uanfala (talk) 03:36, 16 March 2019 (UTC)[reply]
    I agree that things that will rarely/never updated don't need to be in templates – this was part of my point above about in some cases they're useful and in other cases not – the issue is that a blanket ban leaves no room for decision on where they're appropriate. As an aside, population density can be calculated by using a mix of static and templated data like at Subdivisions of Scotland#Council areas. Number 57 11:57, 16 March 2019 (UTC)[reply]
  • Yes – In addition to the arguments above I refer to the Keep arguments at Wikipedia:Templates for discussion/Log/2019 March 2#Template:Metadata Population BE. -- Michael Bednarek (talk) 05:30, 16 March 2019 (UTC)[reply]
    Number 57, Underlying lk & Zackmann08 very useful like {{English football updater}} templates. We are using in Turkish wikipedia. Those are also protective for vandalism. We thought same templates for population but after that we entered all province and district population wikidata page. There are almost 1.000 pages. We collected all Q numbers in a excel file. And we are working going on to take those datas from wikidata. And next years will be add automatically with BOT, because of collecting data excel file. Wikidata example is Trabzon, in Turkish wikipedia example also tr:Trabzon. Regards, Sakhalinio (talk) 05:45, 16 March 2019 (UTC)[reply]
  • No - WP:Wikidata is for data. The project was created in part because the template namespaces were becoming perverted into data stores. The template namespace is for structures, navigation, and aesthetic design - not data. Templates are perfectly capable of invoking calls to Wikidata properties, and more of those are converted to do so every day. Now, if we're talking about article text content (prose), that belongs in the article where editors can easily access it and track changes. This also avoids single points of vandalism. In fact, I think the current guideline would be better with one word struck to read: Templates should not normally be used to store article text. If you want to read a horror story about how messy it is to misuse the template namespace for data/prose, read up on Template:Cite doi and its like. Took months of cleanup. -- Netoholic @ 06:48, 16 March 2019 (UTC)[reply]
    • The problem with Wikidata concerns the work required to update, say, 100 articles with population changes when a new census arrives. If the data is in a template, one edit can be made, and it's easy to compare the template with the source for checking. Updating 100 items at Wikidata would be extremely time consuming and fragile (hard to check for typos). Also, it's very easy for vandalism to occur at Wikidata and very hard for enwiki editors to notice bad changes. A blue-sky plan would be to have data in a JSON page at enwiki, with a bot that updates Wikidata to match changes in the JSON page. The bot would also have to monitor changes made at Wikidata and report conflicts in a single location on enwiki. Johnuniq (talk) 10:18, 16 March 2019 (UTC)[reply]
      • I agree with the general approach Johnuniq suggests. We need to retain control over changing data that is used here. Yes, in principle, templates should not be now be used to store data because there are better technologies, such as JSON, available to us. However, this requires hard-pressed editors to learn yet another new coding language – there are plenty of complaints around about templates that have been changed into Lua modules, with the consequent need to learn Lua to alter or maintain them. But it's an approach that should be considered for new projects, even if converting existing ones (like the automated taxobox system mentioned in my comment below) is unlikely to happen. Peter coxhead (talk) 10:30, 16 March 2019 (UTC)[reply]
        • I think that Wikidata is good place to move that data. However, currently there is no support for wikidata in infobox templates. In example only thing what template:Infobox settlement reads from Wikidata is coordinates, photos and webpage so even if the census data is updated to Wikidata the infobox doesn't use it. --Zache (talk) 12:38, 16 March 2019 (UTC)[reply]
          • @Zache: There is support available for Wikidata in infobox templates. See Module:WikidataIB and Category:Infobox templates using Wikidata for examples of how and where – and Template:Wikidata Infobox for an extreme example. Anyone is free to update infoboxes to draw data from Wikidata, although I would recommend testing in the sandbox and then getting consensus first. --RexxS (talk) 12:51, 16 March 2019 (UTC)[reply]
            • @RexxS: I didn't mean that if it is technically possible, but that there should be implemented support in infoboxes like template:infobox settlement etc before the existing solution to store data to templates can be deprecated. With implemented support, I mean that infobox is actually showing the data from Wikidata or from Commons tabular data. --Zache (talk) 09:00, 19 March 2019 (UTC)[reply]
      • Johnuniq, it is actually quite manageable to update thousands of Wikidata entities using QuickStatements, and it doesn't take any more time than doing it with metadata templates. I did it for Belgian, Russian, Swiss and German municipalities, and wrote a short guide on how to do that on {{Austria metadata Wikidata}}.--eh bien mon prince (talk) 11:07, 16 March 2019 (UTC)[reply]
  • Yes – at least in some cases. About 220,000 articles have taxoboxes generated through the automated taxobox system, which stores its taxonomy in almost 60,000 taxonomy templates. No alternative to this system is currently viable, and even if it were, conversion would be extremely difficult and time-consuming. If you want to know why Wikidata isn't a possible alternative, I'll be happy to try to explain, but be warned that the history of this discussion is very long and detailed (see e.g. here). Wikidata is fine for storing straightforwardly and uncontroversially structured data that changes very rarely, if at all, so sure, once it was available, mapping doi's to citation details is better handled in Wikidata. It is not suitable for storing data that does not fit into its rigid relational database model (e.g. it cannot model real world relationships such as the non-1:1 relationships between articles in different language wikis or the overlapping taxonomic hierarchies that result in a network of relationships rather than a tree). It has many, many fewer active editors than there are here, so data that changes does not get updated and maintained as well. Peter coxhead (talk) 09:58, 16 March 2019 (UTC)[reply]
  • Yes, as the question is currently phrased. Just to pick one of many examples, take a look at the data in Template:Sacramento Kings roster. The data in that template is transcluded in Sacramento Kings, List of current NBA team rosters, and 2018–19 Sacramento Kings season. Being able to reuse data of this sort is one of the reasons that we have templates. To pick another (admittedly more controversial, judging from a recent no-consensus TFD discussion) example, take a look at the series of templates described at and linked from Template:LDS Temple/doc. Each piece of data in those templates is stored in a single location and used in a variety of pages. Having that data stored in individual pages or templates would lead to forking and more difficult maintenance. – Jonesey95 (talk) 10:44, 16 March 2019 (UTC)[reply]
    Jonesey95, @Pppery: I think you might need to clarify this RFC, because the example that Jonesey used above is NOT what we are talking about here... What we are talking about is massive switch statements that return nothing but an integer value. --Zackmann (Talk to me/What I been doing) 20:51, 16 March 2019 (UTC)[reply]
    @Zackmann08: Just do so, then (although I suspect it will provoke more "moving the goalposts" triigers). I give you permission to edit the opening statement of this RfC to make it clearer. (Although my intent was not just "massive switch statements": templates that do the same thing using subpages could also be considered here. {{3x|p}}ery (talk) 20:55, 16 March 2019 (UTC)[reply]
    I was just responding to the question as written: Is storing data an acceptable use of template namespace? It seemed to me that the obvious answer was yes. In writing RFCs, it is important to get the question(s) correct if you want to get useful answers. I find that sometimes a pre-RFC discussion can help craft a good question. Template:Sacramento Kings roster is without question storing data, and in this case it's in a very nice, sortable table format. – Jonesey95 (talk) 21:35, 16 March 2019 (UTC)[reply]
  • Yes I'm in strong agreement with application of the principles outlined above that generally conclude this ought to be deprecated, there needs to be a good foundation and exceptional reasons to transclude information. The exception is what Peter refers to above, I highly recommend that people examine what has been done with our taxobox system before concluding there is another solution. Wikidata doe not provide the means to accommodate what is done here, a century's old classification built on a web of citations, and I that is probably a good thing as I have reflected upon the arrangements at the sister sites. cygnis insignis 10:46, 16 March 2019 (UTC)[reply]
  • Yes: We would be foolish to reject storing data in templates on principle. Why would we want to restrict our choice of ways of accomplishing a job? There are three main ways of storing a dataset for use in an article, and each of them may be optimal for some cases:
    1. Code the dataset directly into the page that uses it. This is fine for single-use datasets, especially when frequent updating isn't needed. Any non-Wikidata-enabled infobox is a good example of this.
    2. Place the dataset in another page (Template: namespace is then the obvious choice) and programmatically read that data into the article, or transclude the raw data directly if it needs no further processing. A recent example that I saw is in the article Bordeaux #Population where both the population change table ({{Table Population Town}}) and the population over time chart ({{Chart Population Town}}) draw their data from the same source, {{Database Population Bordeaux}}.
    3. Store the dataset on Wikidata. This makes the data available to other projects, but suffers from all the problems deriving from the lack of editors maintaining Wikidata, and needs somebody to write a piece of code to fetch that data for use in an article here. {{Infobox gene}} is a good example of using Wikidata datasets and how an English WikiProject maintains the data on Wikidata for its uses here.
There is a spectrum of abilities and of needs in curating data for use in Wikipedia articles. Our most valuable resource is committed editors and we should retain the flexibility to use whatever solution is preferred by the editors curating that data. It's not our place to impose our own preferences on them. --RexxS (talk) 11:52, 16 March 2019 (UTC)[reply]
  • Yes, but it depends. Templates should be considered on a case-by-case basis, and not blanket-ly. Also,
  1. Re #1: sometimes, data in templates provides ease of access.
  2. Re #2: look at the template's edit history and ask someone to update the entire template if you can't do it yourself.
  3. Re #3: a contrived example, akin to 'ladders exist, so how should someone get to the 100th floor of a building, use a bunch of ladders?'. No, take the stairs, i.e. Wikidata. {{Wikidata}} and other similar templates exist for this purpose, and can be used in satisfy said examples.
  4. Re #4: WP:DWAP.   ~ Tom.Reding (talkdgaf)  12:32, 16 March 2019 (UTC)[reply]
  • Comment: The RfC is unfortunately worded. What should be asked is "should we be migrating data to Wikidata, and transcluding it from there rather than storing it in back-end data templates", to which the answer is a resounding yes. As with most things on Wikipedia, there is no deadline, and exceptions (for circumstances where Wikidata is not yet ready, for example) apply. Arguemnts about the ease with which multiple articles can be updated by changing a single Wikipedia data template are flawed, because they ignore the possibility that those articles exist in up to 300 Wikipedias in different languages; and they ignore the tools that exist, for conveniently making batch updates to Wikidata. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:06, 16 March 2019 (UTC)[reply]
  • Yes, agree with the above, should be assessed on a case-by-case basis where these types of templates would be very useful. A blanket ban would not be helpful. Vaselineeeeeeee★★★ 14:59, 16 March 2019 (UTC)[reply]
  • Is storing data an acceptable use of template namespace? Generally no. I would much prefer migration to Wikidata. "Only 1 edit" argument can be a non-issue with e.g. d:Wikidata:QuickStatements (which is actually easier to manipulate IMO than a template which could be prone to operator error). Exceptions may apply (for example, I don't particularly support automatic taxoboxes here rather than Wikidata, but to enable those the best we would need to be able to query up the subclass chain, and that particular effort is not supported yet). --Izno (talk) 15:56, 16 March 2019 (UTC)[reply]
    • @Izno: "that particular effort is not supported yet" – it could be, see c:Module:Taxontree. I'm not sure you'd like the results, though. c:Medicago sativa is a typical example of it embedded in an infobox. --RexxS (talk) 16:19, 16 March 2019 (UTC)[reply]
      • @Izno and RexxS: This sub-discussion is at the wrong place; it should be at Wikipedia talk:Automatic taxobox system. {{3x|p}}ery (talk) 16:34, 16 March 2019 (UTC)[reply]
        • Not really? It was brought up above as a "we should allow this kind of data". I don't think we should so I commented on it. :) --Izno (talk) 16:41, 16 March 2019 (UTC)[reply]
        • @Pppery: My small note is fine here. The subject of broadening Wikidata usage is perfectly relevant to this discussion, and you don't get to decide where I post comments. Stop trying to over-regulate everything. Your compulsions are not shared by the vast majority of editors. --RexxS (talk) 16:54, 16 March 2019 (UTC)[reply]
      • I certainly wouldn't support the identifiers, but the class hierarchy seems entirely reasonable, which is the predominant reason for the automatic taxobox system existing in the first place. IIRC it currently requires multiple arbitrary access to a Wikidata item (each step up the tree), which is expensive, which is why I said "not supported". Embedded SPARQL queries would make that much more powerful, but that is not supported at all (and which is what I made reference to). --Izno (talk) 16:41, 16 March 2019 (UTC)[reply]
        • @Izno: The code I write no longer makes use of the old calls to enable arbitrary access. Previously it had to load the entire Wikidata item (statements, links, labels, descriptions, etc.), which was classed as expensive. The latest API lets us fetch a single statement from an arbitrary entity, which is not expensive. That has allowed these sort of chains to be followed. Another example is the location function in Module:WikidataIB which produces results like Selby, Selby District, North Yorkshire, England. Cheers --RexxS (talk) 16:54, 16 March 2019 (UTC)[reply]
        • @Izno: actually, it's very wrong to speak of the classification hierarchy. Different wikipedias use different and incompatible systems of classification for the same group; we here use different and incompatible classification hierarchies for different groups (e.g. for birds and dinosaurs). This is perfectly justified, since taxonomic decisions are in the end subjective. No-one has yet shown how different but overlapping classification hierarchies, together forming a tangled network, can be stored in Wikidata. (We manage it here in an ad hoc fashion via skip and variant taxonomy templates plus customized code.) The general point is that each proposed use of Wikidata must be considered on its merits, not by some blanket decision. I'm in no way opposed to using Wikidata when it can be made to do what we want (e.g. taxonbars). Peter coxhead (talk) 21:04, 16 March 2019 (UTC)[reply]
          • Careful, careful, not to straw man what I have said, which was specific to the example that RexxS provided. I am aware there are differing hierarchies for certain groups. No-one has yet shown how different but overlapping classification hierarchies, together forming a tangled network, can be stored in Wikidata. Wikidata already does so? You add a source for the particular system's hierarchy or even an ad hoc paper for a particular arbitrary grouping. If you were interested in all of a particular system's hierarchy for a specific taxon, as you walked up the classification tree you would filter out all of the systems not equal to the one of interest on a particular wiki page. If you were interested instead in a list of all the parent classes and their parents, that could be a table embedded in the article-proper. I think this is clearly in the realm of the possible based on my own experience. That said, perhaps these infoboxes fail in that what they should provide is only the most immediate classes in the hierarchy up or down. Other infoboxes have little issue with this way of looking at things. --Izno (talk) 23:08, 16 March 2019 (UTC)[reply]
  • Yes Certainly on a case by case. I see now reason why it would be of benefit. scope_creepTalk 16:48, 16 March 2019 (UTC)[reply]
  • Yes, and I think with how the question is framed, it would be difficult to say no—even if one believes that it's not desirable, there are some WP:COMMONSENSE cases where it might be, so unacceptable is a very strong word. In any case, I actually believe that it's also generally desirable in the provided use cases, until there is an alternative solution that does the same. I think the benefits it brings are largely the ones said to be disadvantages by User:Zackmann above:
    • Ease of access: yes, one would need to go to a different page to edit the template, but this is the case with any template on Wikipedia, and it's easy to pick up even for relatively inexperienced editors who understand WikiMarkup (not sure how it works with VE). However, when editing the template, all the data is in one place, which improves ease of access.
    • Outdated references: I haven't personally encountered such a problem in data templates, but I would imagine that the point of a data template would be to have a list of data points that comes from the same source or a small number of sources. In such a case, updating references is significantly easier with a data template than a thousand different articles. I think the example given by Zackmann actually proves this point.
    • Dangerous precedent: I think that only the contrary, any of the nominated templates is a good example of how to resolve the very annoying problem of having to update hundreds of articles when new data is available, so it sets a good precedent to follow. If there are use cases where data templates don't work well, editors will realize that it's not working and go back to the old method—or just not create these tempaltes in the first place.
    • Performance issue: To be honest I don't know how switch statements are implemented on MediaWiki, so it could be that Zackmann is correct and it's a huge performance drain. However, there is a possibility for Lua templates now which bring templates closer to the actual computational performance (it's not exactly a low-level language, but far more efficient than WikiMarkup conditional statements). Making 1000 switch/case comparisons in PHP 7.x takes tens of microseconds on a typical machine, which doesn't seem like a big deal to me, even assuming a single-server architecture (not the case) and no cache whatsoever (also not the case). In any case, it should be the other way around: if we find data templates really useful but they are slow, we should all vote to have the performance improved in the annual community tech wishlist survey—not avoid using the feature. If it's catastrophic, WMF engineers are likely to intervene, like they did with the custom fonts.
Ynhockey (Talk) 19:32, 16 March 2019 (UTC)[reply]
  • Yes. "Bulk updating" is actually fairly common: usually new population data is released by statistics offices for an entire country (or country subdivision) at the same time. Some of the data can't be easily bulk-moved to Wikidata for license reasons. I believe in performance issues only when a dev tells us not to do something. So the data template setup works. The argument that I can agree with is that data can be hard to edit, but a lot of the data is not supposed to be edited. There should be clear instructions in the infobox or other templates that call the data how the data can be updated. Editing the entries on Wikidata isn't intuitive for the first time user either, so overall the case against data storage templates isn't very strong. And finally, I can't see how creative use of the template space sets anything but a good precedent. —Kusma (t·c) 20:17, 16 March 2019 (UTC)[reply]
  • Invalid question. Technically anything counts as data, so the answer is of course yes. I think we should discuss what we mean by "data," and formulate some red lines over what is and isn't acceptable, before delving straight into !voting. -- King of ♠ 01:18, 17 March 2019 (UTC)[reply]
    Certainly the question should be focused on encyclopedic content/data which normally requires a WP:CITE on a main space article. -- Netoholic @ 15:00, 17 March 2019 (UTC)[reply]
    Good point, the population templates I'm familiar with (for German states like {{Metadata Population DE-NW}}, {{Population Cape Verde}}) have a reference and offer easy transclusion of that reference. Markussep Talk 19:41, 17 March 2019 (UTC)[reply]
  • Yes, per Kusma. Markussep Talk 19:43, 17 March 2019 (UTC)[reply]
  • We're getting into snow territory here, but most definitely yes. A great example is something like Template:Extrasolar planet counts: it uses the numbers subpage to store all the data needed, and is faithfully updated each month by a dedicated user. It's simple and designed to solve a few of the exact issues presented above. I don't think "ease of access" isn't a huge concern, as the mere usage of templates ({{whatever}}) is enough to complicate things, and I certainly don't think the precedent can be called dangerous. See also WP:PERFORMANCE. I also take the comments above about how one defines data to be well-said. Similarly, there are a ton of modules with data stored in /config or similar subpages. ~ Amory (utc) 10:49, 18 March 2019 (UTC)[reply]
  • Yes Bulk updating is obviously needed to be done regularly in regards to census and other similar results which may be updated yearly or ever 5 or 10 years. Makes it more convenient in some cases, but that doesn't set a "dangerous" precedent for other cases where the data is not updated in one go by one authority. Ease of access isn't an issue when the data does not need to be changed unless an update is released by the relevant authority. Galobtter (pingó mió) 18:36, 20 March 2019 (UTC)[reply]
  • Yes at present. I think some effort could be made to gradually move some data to Wikidata (especially if used on multiple Wikipedias) but that should be a process guided by local discussion specific to each template or group of templates. --Tom (LT) (talk) 06:35, 22 March 2019 (UTC)[reply]
  • No, it is not. Let's not nitpick on the definition of data. For the described kind of purpose(s), Wikidata is the platform to use, not the enwiki template namespace.
    Disclaimer: Invited by Legobot, am a fan of the Wikidata idea, typing on mobile
    ~ ToBeFree (talk) 18:05, 30 March 2019 (UTC)[reply]
  • Yes some templates should be used to store some data. There are sure to be cases where that is unwise—like everything, discussions on a case-by-case basis are needed. The suggestions to use Wikidata, perhaps with QuickStatements, might work in some cases but this RfC cannot mandate that procedure. Wikidata is subject to vandalism that cannot be detected at Wikipedia. Using Wikidata is a timebomb until there is a bot which can transfer data from a central page on Wikipedia (which can be watched for changes) and report daily on any changes made at Wikidata. Editors are volunteers who know how to deal with wikitext. They should not be compelled to use QuickStatements or other foreign systems, particularly when those systems cannot check for vandalism. Johnuniq (talk) 00:02, 4 April 2019 (UTC)[reply]
  • Sometimes. This is a case-by-case matter. Some good use cases have been outlined above (and have been heavily used, enjoying long-standing consensus). Others are very wrong-headed, and are rightly TfDed.  — SMcCandlish ¢ 😼  10:14, 4 April 2019 (UTC)[reply]

Discussion[edit]

  • I find some of the examples and justifications used in this RfC so far to represent naive "cleverness" rather than good sense, and give no consideration to the long-term health of the project. This RfC as worded does not make a clear recommendation as to the overall direction use of this namespace should head. The choice is this: do we acknowledge that some data is currently in the template namespace but that the long-term plan is to move toward deprecating such uses in favor of other methods ("list of" articles, wikidata, bot updates, etc.), or are we saying that we should encourage moving more and more data into templates? Well, I think only the first of these options is in alignment with the intended use of templates. The template namespace is not a database, and our policy should be to constantly move toward eliminating article content from it. This has been the stated purpose in this guideline for almost 15 years. We have deleted templates which contained whole paragraphs of prose to be used on multiple articles. We have deleted a whole system of citations being stored in templates. And now we've already got many templates with individual data points (populations, planet counts, etc.) which change over time. The problem is, where does that end? Do we create #switch templates to cover the current head of state in every country, the current roster of every sports team, the current Billboard top 100, the current outdoor temperature in every city? This RfC has developed no guidelines, limitations, or recommendations which would prevent the creation of any of these or for any data set imaginable. In fact, if the present trajectory holds, it would almost seem to encourage them. But I will point out that in the cases I mention above deprecating prose and cite_ templates, the first instinct of the community was to support them, their use and scope grew over time, and then the problems became apparent and the community rejected them, but not after a lot of effort and clean-up - all of which could have been avoided by sticking to the proper scope of the template namespace in the first place. Article content (and the citations that support them) belong in the articles themselves. We have no requirement that such data be "current", only WP:Verifiable, and there is no deadline. Let's not go down the wrong path again. -- Netoholic @ 12:50, 18 March 2019 (UTC)[reply]
    • Storing data in a template works well when a single reliable source regularly issues a set of data that is used in multiple articles. With one source and one template, updating and checking for typos is greatly simplified and made much more reliable. No single source issues a table of heads of state, so gathering that information into a single template would not be useful. Data-in-a-template works well in some situations and not in others. Johnuniq (talk) 22:37, 18 March 2019 (UTC)[reply]
      • All you're doing is repeating how convenient this is, on the small scale, but not addressing why this is a good practice long-term or on a wide scale. Also, I'll point out that relying on only a single source can itself lead to WP:Verifiability or WP:NPOV problems, so maybe its a really poor practice. -- Netoholic @ 00:16, 19 March 2019 (UTC)[reply]
        • The alternative to {{Swiss populations data CH-ZH}} would be to edit around 200 articles to change the population values when the source releases new data (and for other editors to check each change to the number in each of the 200 articles). Single-source problems apply to an article and are not applicable for one item such as the population in a municipality. Editing data in one place (when that data comes from one source) is easier and much more reliable. I agree that some templates will be inappropriate—each needs to be considered on its merits. When there is a magic system to update Wikidata and monitor the Wikidata values, we might get population information from Wikidata. Johnuniq (talk) 01:34, 19 March 2019 (UTC)[reply]
          • "when the source releases new data" - why? You're operating under the assumption that Wikipedia articles must include data points which are absolutely current. -- Netoholic @ 02:25, 19 March 2019 (UTC)[reply]
            • I think it's good practice to aim for the most up-to-date information. You're right that the template namespace is not a database, but the guidelines do not prohibit using it as such. IMO, a population number is not a piece of text as meant in the first guideline (Templates should not normally be used to store article text, ...). Markussep Talk 10:18, 19 March 2019 (UTC)[reply]
              • I've always been open to changing "store article text" to "store encyclopedic content" or anything else that makes it more clear that any data (text, information, citations, etc.) about a topic should not be stored in the template namespace. This is why template calls within articles is fine, because the data point is stored in the article's history as a parameter. -- Netoholic @ 14:06, 19 March 2019 (UTC)[reply]
                • That's your opinion, not an accepted guideline. Markussep Talk 14:27, 19 March 2019 (UTC)[reply]
                  • No, in fact it is the accepted guideline: "article text" links to Wikipedia:What is an article?. That page describes the content found in articles, including text, citations, etc. My point was that I am open to better wording, but the guideline already says that article content does not belong in the template namespace. -- Netoholic @ 19:23, 19 March 2019 (UTC)[reply]
                    • Wikipedia:What is an article? is an information page, "... not one of Wikipedia's policies or guidelines, as it has not been thoroughly vetted by the community." Templates like {{Table Population Town}} are article content and contain data, as is {{Chart Population Town}}. Surely nobody is suggesting that we hard-code each of those (along with the same data each time) in every article that would benefit from them? --RexxS (talk) 19:41, 19 March 2019 (UTC)[reply]
                      • I think we all know what qualifies as "article content" - that being the facts and figures related to a particular topic. You're being pedantic. But no, those templates only provide stylistic elements. The actual article content related to those templates is within the individual "databases" like Avignon Template:Database Population Avignon or Template:Database Population Bordeaux. These numbers are what belong stored within the article for those individual towns - there is only one article that benefits from each of them: Special:WhatLinksHere/Template:Database Population Bordeaux. Having them split out like that is exactly against the WP:Template namespace#Guidelines. -- Netoholic @ 20:21, 19 March 2019 (UTC)[reply]
                        • This is another illustration of a way in which this question is poorly formed and should have been the subject of discussion prior to this RFC. Template:Database Population Avignon is article content, and it used in only one article. The existing guideline already covers this sort of thing; the template should clearly be substed and deleted. The existence of Template:Database Population Avignon does not really bear on what this RFC should have been about, but because the question is too broad, we are talking about things that we shouldn't even need to discuss here. – Jonesey95 (talk) 21:28, 19 March 2019 (UTC)[reply]
                          • But that's not what I said. Please don't call me pedantic when you've not even read what I wrote. Look at Bordeaux #Population. There are both of the templates {{Table Population Town}} and {{Chart Population Town}}, each of which use {{Database Population Bordeaux}}. The data is used twice in the same article. Are you seriously contending that we should subst those templates and then delete the data? What happens when it's time to add another year's population information? What is easier: to redo the table and chart to accommodate the new value; or to simply add another datapoint to {{Database Population Bordeaux}} (which is done by bot anyway)? That's what datasets are for. And the same sort of argument applies to hundreds of sports-related templates which are updated even more frequently. Whoever wrote WP:TPG had failed to consider the case when the same data is used indirectly via two different templates in the same page. The only pedantry is thinking that guidelines are prescriptive, rather than descriptive. If you don't believe me, try using TPG as a rationale for deleting {{Database Population Bordeaux}} and see how far you get. --RexxS (talk) 22:02, 19 March 2019 (UTC)[reply]
                            • Guidelines are prescriptive. The word is taken from rope (line) which is laid along a path which is intended to be used by a traveler to hold onto and be led (guided) along the path. -- Netoholic @ 02:24, 20 March 2019 (UTC)[reply]
                              • Absolute nonsense. Policies and guidelines have always been descriptive on Wikipedia. Have a read of this useful essay, Wikipedia:Product, process, policy and note this:

                                Since the policy is a result of process and practice (instead of the other way around) it is quite possible that policy changes as a result of practice changing. Another important principle is that Wikipedia is not a bureaucracy. Policy is subservient to product, not the other way around.

                                The result of this setup is that policy pages are often a step or two behind process. Whenever the result of process does not correspond with policy, it means that the policy is outdated. When we encounter a new situation, we are not required to base our discussion on policy. Rather, we base a new policy on the process of discussion. A corollary of this fact is that we, as a rule, do not vote on new policy or guideline pages. Frequently, we simply write down what already happens. Anything that describes the usual outcome of a common process is a good guideline for the future.

                                You envisage an encyclopedia where rules are in place in order to determine how we must edit. That's not Wikipedia. --RexxS (talk) 18:29, 20 March 2019 (UTC)[reply]
                                • You just quoted an essay, not a guideline. Guidelines are prescriptive, in that, if someone want's to go against them, they are considered to be going against the established consensus. Consensus can change, and something like an RfC can certainly describe how we want to change them, but then they become prescriptive until a new consensus is shown. -- Netoholic @ 19:31, 20 March 2019 (UTC)[reply]
                                  • Yes I quoted a useful essay as I stated. Which part of it do you disagree with? You've cited nothing but your own mistaken opinion. Policies and guidelines are descriptive, not prescriptive. They are descriptive in that they describe our consensus on what is best practice. They are not prescriptive in that they do not prevent an editor from making an edit. If that edit is shown to be improving Wikipedia, then it will stand. See WP:IAR. That's not an essay, by the way. --RexxS (talk) 20:02, 20 March 2019 (UTC)[reply]
          • "The alternative to {{Swiss populations data CH-ZH}} would be to edit around 200 articles" Not true; use Wikidata. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 00:07, 20 March 2019 (UTC)[reply]
  • Other options Wikidata is being presented as the better solution, but some people prefer to not use Wikidata as they see it as hard to access or understand or monitor for vandalism and it is off-site. And Wikidata is not always a good fit for certain data. If the templates were converted to Lua the data could be stored in Lua tables as separate files, is commonly done. There is also the little known but interesting Tabular Data on Commons - "Tabular data allows users to create CSV-like tables of data, and use them from other wikis to create automatic tables, lists, and graphs." This is cool as you can create and maintain the CSV file using a bot, then a template from any wiki can render the data in articles without the need for a bot to edit the wikis directly. For example keeping weather or election data up to date. -- GreenC 02:36, 19 March 2019 (UTC)[reply]
    • While people make the argument that maintaining a template in one location is more convenient - that only applies to this Wikipedia. Do we want to maintain copy-cat templates in all 300+ Wikipedia languages? Well, suddenly updating in a central location (Wikidata) doesn't sound like such a burden after all. -- Netoholic @ 14:06, 19 March 2019 (UTC)[reply]
      • There aren't 300+ Wikipedia's that use templates to store population data, I count 28 at {{Metadata Population DE-BY}}. Markussep Talk 14:27, 19 March 2019 (UTC)[reply]
        • Thank you for proving my point. There are currently only 28 using that template, but in all we have 300 Wikipedias which this could be copied to. This does not scale. Even maintaining "only" 28 is more work than updating Wikidata centrally. -- Netoholic @ 19:23, 19 March 2019 (UTC)[reply]
          • Tabular data on Commons is a single location accessible to all Wikis. IMO it's better than Wikidata for many applications, and much easier to work with. Wikidata is not the right solution for everything. -- GreenC 14:54, 20 March 2019 (UTC)[reply]
  • Let's go back to basics. Any set of structured data is a database, by definition. So I reject the argument that template space is not a database. It quite clearly can hold databases. The only factor that differentiates templates from other namespaces is that you don't have to include the namespace prefix when transcluding the page. The whole purpose of templates is to transclude them into multiple other pages, so if you have a dataset that needs to be transcluded in other pages, then template namespace is a perfectly logical place to put it. Where things started to go awry was when editors started to process the data in the dataset before including it in an article. The programming ability of template space is rudimentary, to say the least, and it is only through the ingenuity of editors that we have developed complex templates that process data (which is usually held in template space as well). Does this work? Yes. Is it the best way to process data in the long-term? Almost certainly not. Surely we would want to move toward a situation where data is stored in a central location and is processed by an efficient, fully-featured language. The issue at present is that our main central location is Wikidata, and that site is not yet capable of curating the data held there because of lack of editors relative to the size of the database. Commons might look like an attractive alternative for a flat-file database, but at the expense of having to maintain another watchlist in order to keep a check on data that you have placed there – there is, at present, no means of monitoring relevant changes on Commons from your enwiki watchlist. Until we have better quality data on Wikidata, with far more robust anti-vandalism and more mature policies on verifiability and BLP, we are going to have to accept that there will be many places where we simply cannot deprecate storing a dataset locally (and that includes within template namespace in many cases). And once we accept that, you can see why this RfC will remain merely "blue-sky" thinking for the foreseeable future. --RexxS (talk) 13:03, 19 March 2019 (UTC)[reply]
Is watching a single page on Commons really not possible? If that is the only hurdle, it wouldn't be difficult to create a public watchlist program that logs a page on Enwiki every time the Commons page is changed (filtered for bots). Then anyone can watchlist the log page. BTW I love your idea to "move toward a situation where data is stored in a central location and is processed by an efficient, fully-featured language" .. unfortunately we have a minority who believe a "fully-featured language" is a detriment for the majority. -- GreenC 15:06, 20 March 2019 (UTC)[reply]
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.

Excerpts[edit]

I note the use of Wikipedia:Excerpts conflicts with Wikipedia:Template namespace#Guidelines which says "Templates should not normally be used to store article text". {{Excerpt}} doesn't store the text in a template per se, but it seems the guideline should be updated to mention this practice as an exception, if there is consensus to do so. -- Beland (talk) 18:52, 3 August 2020 (UTC)[reply]

It's not an exception; it's just a template that makes labelled section transclusion a little easier. "Using a template to store article text" can be seen in places like Special:Diff/660435790, where the entirety of the text was replaced by a template that had the same content. Using an excerpt (via the template or LST) can be seen at the 2011 version of the same article family - the opening paragraph is copied from the pre-2009 article instead of being stored in a template or needlessly duplicated on the article itself. Primefac (talk) 19:05, 3 August 2020 (UTC)[reply]

Modules in namespace[edit]

At Wikipedia:Templates for discussion/Log/2021 April 10#Template:UTF-16 the question of direct invocations of modules in mainspace came up. I've seen the question before and I feel like it would be a good idea to write it down. I feel like it's a best practice to not systematically use direct module invocations ({{#invoke:Example}}) in the mainspace. Instead a template wrapper should be created and be used in the documentation. This is to make it as simple as possible to use the module without forcing non-technical editors to learn about the invoke magic word, the difference between the template and module namespace and prevent syntax confusion. This shouldn't be a hard rule but rather something to point to when the question comes up. My suggestion would be adding a modules section under the "Suggested practices" heading. It could read something like:

Lua modules are sometimes used instead of templates to store reusable material. Reasons includes usage of module exclusive features such as loops or complicated features being easier to maintain in the shape of a module. If a module is easily implementable in a template it generally should be since there are more users with experience editing templates. If a module is intended to be used in articles a template wrapper should generally be created to simplify usage without requiring the invoke parser function. This syntax should also be used in the documentation.

What do you think? The very simple module clause seems to be quite standard practice, but isn't particularly important to document if someone object. I've also notified WT:WPT. --Trialpears (talk) 22:55, 18 April 2021 (UTC)[reply]

Seems reasonable. The argument (used in the discussion in question, which I've appended to your link above) that having a template be a wrapper is some sort of kitten-killing server-waste is just nonsense, because with very small exception (also listed in said discussion) we just don't do it. It's never been written down because no one has ever really discussed the matter, but if there are concerns starting to arise we might as well codify current practices. Primefac (talk) 23:25, 18 April 2021 (UTC)[reply]
I don't know if someone's mentioned it, but if a large amount of wikitext is involved, a wrapper template may be very costly as it doubles the include size which significantly slows down previews/saves of an edit, and might prevent the page working if the 2MB limit is hit. Johnuniq (talk) 23:47, 18 April 2021 (UTC)[reply]
Right, such as the current uses for things like big sports tables, where the module is just as much for formatting as it is for data storage. I don't know if If a module is easily implementable in a template... is enough to convey that, but it does essentially give that sort of exemption. Primefac (talk) 23:57, 18 April 2021 (UTC)[reply]
Whatever wording is accepted, there should definitely be an exemption for technical needs. – Jonesey95 (talk) 00:27, 19 April 2021 (UTC)[reply]
In my suggested wording below I said that any "convoluted" template would be better as Lua which should be a suitable catch-all for technical difficulties etc – and obviously mere guidance can't tell you to do something technically impossible. User:GKFXtalk 11:14, 19 April 2021 (UTC)[reply]
Thinking about this a bit, I have a couple of thoughts and questions: What is the argument for limiting the preference for template wrappers to those used in mainspace? If it's about the ease of use for editors, should we be concerned about that policy impacting the learning curve when it comes to editors starting to experiment with working on templates, categories, help, etc.?
If there is a legitimate reason to distinguish between namespaces, I would definitely suggest that talk pages would go with articles, so the second sentence would be "If a module is intended to be used in articles or talk pages, a template wrapper should generally..."
Also, the TfD that prompted this discussion seems to center on the converse of this proposal: should template wrappers for modules be limited to those useful for transcluding in mainspace, with a preference for deleting those wrappers when they are primarily used outside of articles? VanIsaac, MPLL contWpWS 00:32, 19 April 2021 (UTC)[reply]
First off, it was not my intention to make a "server kittens" argument against templates. My point is more like this: if I see the code {{wrapper template|arg1|arg2...}} and I wonder what it means/why it's not working, I have to go to Template:Wrapper template and Module:Whatever to figure it out. If Module:Whatever had been used directly, I'd only have to look in one place.
As for the word {{#invoke:}} being scary or raising a learning curve, it's not much different in appearence to parserfunctions etc which are widely used in templates.
There seem to be two seperate pieces of guidance in Trialpears's suggestion above. I've split them giving my opinion below. To answer the TfD question, the second implies that wrapper templates not intended for use in mainspace have no use so would be deleted.
  • Straightforward templates are prefered to modules, and modules are prefered to convoluted templates. This means you should generally use Lua when you want one of its features like loops, arrays, or complex logic.
  • Avoid calling {{#invoke:}} in articles or their talk pages (except when discussing wikimarkup). Use a wrapper template in those cases; in template code call modules directly if possible.
User:GKFXtalk 07:04, 19 April 2021 (UTC)[reply]
I've created a module section. It is based on the text suggested above but modified based on comments here. Shouldn't be anything too controversial in there but feel free to edit/remove/discuss. --Trialpears (talk) 23:12, 28 April 2021 (UTC)[reply]

Shortcut T: for Template:  ?[edit]

Is it possible to have this, as we do with H: for Help: and others? Facts707 (talk) 08:57, 13 June 2021 (UTC)[reply]

Facts707 we kind of do as can be seen at Category:Redirects to template namespace, but there are some problems with the practice in that they technically are in the article namespace meaning they show up in search results when they shouldn't. You can also not use them like you would expect for transcluding a template with a normal redirect in template space being better for that. --Trialpears (talk) 09:07, 13 June 2021 (UTC)[reply]
In addition, the issue has been discussed in the past and consensus is that introducing more abbreviations would be confusing and undesirable. Use {{tl}} if appropriate, otherwise write "Template" if that is what is meant. Johnuniq (talk) 10:03, 13 June 2021 (UTC)[reply]
This is just a side comment to John's post, but I don't understand why everyone insists on using {{tl}} when {{t}} is a character shorter and points to the same template. Also, this gets you essentially the same number of characters, as your hypothetical [[T:Example]] becomes {{t|Example}} (plus you don't need to worry about piping the "T"). Primefac (talk) 10:45, 13 June 2021 (UTC)[reply]
These sort of redirects were effectively deprecated in in 2014 for the reasons that Trialpears has laid out. The problems could be resolved if the T: shortcuts got hard-coded into the wiki software (the way WP: and WT: are), but this seems unlikely to happen. – Uanfala (talk) 11:55, 13 June 2021 (UTC)[reply]
There are a few redirects of this type. But T:MP is not a template, nor are T: The New York Times Style Magazine and t:kort. Except for the DYK related ones, there is very little reason to type them in and to ever use a shortcut. {{:T:ILL}} is longer than {{ill}}, so why would you want a T: shortcut that makes you type more when you transclude it? —Kusma (talk) 12:03, 13 June 2021 (UTC)[reply]
The benefit of such a shortcut would not be in transcluding templates or in referring to them in discussions like this one, but in edit summaries and search boxes. But because T:, unlike C: and D:, is already used widely for other purposes, that's not going to happen. -- Michael Bednarek (talk) 14:04, 13 June 2021 (UTC)[reply]
Edit summaries are the best use case. Your C: and D: links go to Commons and Wikidata. —Kusma (talk) 14:42, 13 June 2021 (UTC)[reply]
Using the searchbox when searching for the documentation of, say, {{Wikisourcelang-inline}}, would also be simpler with T: . The point of showing those links (C:, D:) was indeed to demonstrate how some single-letter "shortcuts" have been implemented; M: and S: are others, but the train for T: has left the station. -- Michael Bednarek (talk) 03:13, 14 June 2021 (UTC)[reply]

Article text-storing templates[edit]

The templates {{Rotten Tomatoes prose}} and {{MC film}} have been nominated for deletion for storing article text, per WP:TMPG. The discussion can be seen here: Wikipedia:Templates for discussion/Log/2022 March 23#Review aggregator prose templates. Erik (talk | contrib) (ping me) 22:45, 23 March 2022 (UTC)[reply]

Guideline about storing text[edit]

WP:TMPG states at the beginning, "Templates should not normally be used to store article text, as this makes it more difficult to edit the content." A recently-closed TfD at Wikipedia:Templates for discussion/Log/2022 March 31#Review aggregator prose templates keeping such a template by default indicates that this guideline is no longer applicable. Templates storing article text are created in good faith, to centralize content, in spite of the presented difficulty in editing it. If there are no examples of templates being deleted under this guideline, then the guideline should not exist any longer. It can be left to the community to determine a consensus or lack thereof to use such templates on a case-by-case basis. Editors are welcome to comment about this point. Erik (talk | contrib) (ping me) 17:56, 16 April 2022 (UTC)[reply]

No, it indicates that in one specific case enough people who are not regularly involved with templates moaned enough that the rule wasn't enforced. If you do a search for "article text" in TfD archives, then you can see that the rule is generally enforced. One discussion that goes against an established consensus does not nullify the future applicability of that consensus in other discussions. * Pppery * it has begun... 18:01, 16 April 2022 (UTC)[reply]
These discussions are always limited to a handful of already-involved editors, and this particular template had extraordinarily high visibility. The lack of deletion validates this kind of template in spite of the guideline. The next article text-storing template (especially in regard to film and television) can point to the preceding one on the same grounds, and so forth. There's no reason to keep a law on the books, so to speak, if it is irrelevant in the face of large-scale use across popularly-trafficked articles. The guideline simply did not apply for an ideal example that warrants it in the first place. It's time to simply remove it and let templates' existence be determined by the community for each template. Erik (talk | contrib) (ping me) 18:15, 16 April 2022 (UTC)[reply]
No it's not time to delete common-sense rules. A few exceptions for any rule can always be found. Further, "no consensus" is hardly a ringing endorsement and the text involved is short and a good argument for consistency can be made. Johnuniq (talk) 00:25, 17 April 2022 (UTC)[reply]
The review aggregator prose templates and others like {{Year article header}} that I don't anticipate will be challenged anytime soon indicate that there's at least some level of support for prose templates in some circumstances where text format can be highly regularized. The current guideline acknowledges that with normally; I might weaken that slightly, but I don't see a huge issue. {{u|Sdkb}}talk 05:37, 17 April 2022 (UTC)[reply]
I'm saying that this outcome (which defaults to keep, which is the actual outcome) sets a precedent that ultimately contradicts the guideline. This is what will happen. This high-visibility template will appear on more and more film articles (which are some of the most highly trafficked on Wikipedia) because certain editors are obsessive with proliferating shiny new features. The above editor and others like them will come up with more kinds of article text-storing templates. I can see them being empowered to create such templates for CinemaScore, Box Office Mojo, etc. where any related TFD attempted will have WP:TPMG be irrelevant because the Rotten Tomatoes template already exists. Why would any of these be truly deleted (not kept, not "no consensus") if RT survived and continued to be used? When these templates became more and more prevalent, this part of the guideline will become more and more obsolete and unquotable. It didn't apply when it was most relevant. Erik (talk | contrib) (ping me) 14:10, 17 April 2022 (UTC)[reply]

Template titles[edit]

This page states that Template function should be clear from the template name, but redirects can be created to assist everyday use of very popular templates. Is this still community consensus? I recently opened a RM at {{efn}}, citing that sentence. The vibe I got from that discussion was that this may not be in line with current community consensus. Is this the case? Courtesy pings for everyone who participated in the discussion: @Jonesey95, Graham, Redrose64, BarrelProof, AlphaBeta135, and Uanfala: HouseBlastertalk 20:13, 26 February 2023 (UTC)[reply]

  • My opinion: Templates should follow the convention we use in every other namespace: host the page at the full title (with few exceptions, such as NATO), but have redirects from abbreviations to assist in everyday usage (e.g., WP:NPOV for Wikipedia:Neutral point of view). Just because the template has a long title does not mean that people will use the long title, and it is okay if the full title is not what people type. When was the last time you saw someone write out Wikipedia:Biographies of living persons? We can have the best of both worlds: short redirects so that wikitext is not clogged full of {{Template link with subst|Houston Texans roster navbox}}, and longer titles so that template function is intuitive from the name. HouseBlastertalk 20:13, 26 February 2023 (UTC)[reply]
    I think that the quoted passage is still the general consensus, but the linked nomination was a complex one, not a simple one. There was no consensus about the best way to rename this set of templates, so the status quo remained. If there was only one template called {{efn}}, I think the move would have been accepted with no trouble. – Jonesey95 (talk) 20:19, 26 February 2023 (UTC)[reply]
  • I think that sentenacne si very reasonable still and whole dhave agreed with you in the move request. Immeedietöy seeing what the template does is important and should be generally followed. --Trialpears (talk) 20:33, 26 February 2023 (UTC)[reply]
  • My comment in that prior discussion was basically supportive of that statement, although I may not have been perfectly clear about it. I said "I suspect a lot of people don't know what 'Efn' stands for." I think it is desirable to use template names that people understand. I suspect the {{efn}} template would be used more if it had a name that was easier to understand and remember. But alas, that RM is now closed, and that view did not win the day this time. —⁠ ⁠BarrelProof (talk) 21:09, 26 February 2023 (UTC)[reply]
  • That bit in the guideline is applicable to the vast majority of templates, but not to all, and certainly not unconditionally. What matters most is that a template's function should be clear from its name in the wikitext where the template is used. How the title appears in other contexts (e.g. the template page where immediately following the template title the reader will see the template's documentation, or in a category listing where that template will be surrounded by other similar templates) is much less important.
    The crucial consideration is that in the wikitext where a template is used, there may occasionally be other factors at play. For the very small number of frequently used in-line templates (especially ones that are prone to appear several times within a single paragraph of article text), this competing factor is the need to keep the wikitext neat and readable. This leads to a preference for concise template names, even if that is at the cost of clarity. That's the reason {{sfn}} and {{efn}} are titled the way they are. Of course, my assumption here is that the tile of the template should be the form that's going to be recommended for use in wikitext (i.e. we don't have the template at one title but all its examples in the documentation using an alias); otherwise, things would be more complex, not easier for users to understand, and there would be much less point discussing the title of the template (because it wouldn't matter much after all).
    This is also the reason why the analogy with the WP shortcuts isn't helpful. Something like WP:V is there only as a typing aid. You're not going to see these shortcuts used in any properly written projectspace text; good practice is to write out the full Wikipedia:Verifiability, even inside a piped link. Something like {{sfn}}, on the other hand, isn't just a typing aid, it's the form best suited for use in wikitext. You're not going to see {{shortened footnote|Smith|2009}} in any thoughtfully written piece of wikitext.
    However, these principles don't appear to have been applied universally (for example, {{harv}} is actually at {{Harvard citation}}), and as evident from this, and other, RMs, there is a subset of the community who disagree with them (or rather, don't seem to acknowledge they exist). – Uanfala (talk) 21:45, 26 February 2023 (UTC)[reply]
  • I did not participate -- probably some other user *named* Graham but with a different user name. Graham (talk) 04:55, 27 February 2023 (UTC)[reply]
    Indeed, it was Graham11 who signs themself Graham. --Redrose64 🌹 (talk) 08:36, 27 February 2023 (UTC)[reply]
  • With redirects, there is no technical reason not to follow the guideline. No change to the wording of that line is necessary. Far more template discussions have closed following this guideline than have not, and those are usually due to an abundance of misunderstanding and inertia like seen in that efn RM. -- Netoholic @ 06:38, 27 February 2023 (UTC)[reply]
  • Despite changing hundreds of template names over the years to follow this sentiment, there are some people are incredibly set in their ways. Maybe four years has changed the opinions of the people in this discussion but I am not going to hold my breath that people attending these sorts of RMs will actually come around to the opinion that cryptic template names are not helpful. Primefac (talk) 12:44, 6 March 2023 (UTC)[reply]

Article tables?[edit]

Templates should not normally be used to store article text. However, article tables (especially with detailed data) seem to be a common use for templates. See, for example, Template:Low melting point alloys and Category:Materials science templates. I'd like to propose clarifying the template guidelines with respect to stand-alone tables, please. Either permitting this particular use or making it explicit they are also discouraged. Just like any other type of article content, it's still difficult to edit content segregated in templates. (BTW, couldn't this issue be ameliorated with a standard template header/footer with View, Edit, Talk links?). If the banning of templates for article tables is ratified, should this updated guideline be pro-actively enforced on all current cases (with nominations for deletion or merging)? fgnievinski (talk) 02:06, 22 April 2023 (UTC)[reply]

 You are invited to join the discussion at Template talk:Rotten Tomatoes prose § RfC: Should this and similar templates be substonly?. {{u|Sdkb}}talk 20:59, 1 December 2023 (UTC)[reply]