Page MenuHomePhabricator

Have a way to prevent unexpected additions of parameters in a template via TemplateData
Closed, DuplicatePublic

Description

Problem

Templates like "expand section" are designed to encourage people to edit by displaying a message like "that section is empty, please edit it".
Then, some people do the following:

  1. edit the page
  2. click on the "expand section" template which displays "edit it"
  3. click on "add information"
  4. add information on the search field - sometimes, some people are adding thousand of bytes
  5. click on the grey field containing your text
  6. Apply, The information you have added is not visible but is in the article¹

Reproduiced: https://en.wikipedia.org/w/index.php?title=User%3ATrizek_%28WMF%29%2Fsandbox&type=revision&diff=740307754&oldid=740307694
Initial examples from fr.wp (ongoing discussion): https://fr.wikipedia.org/w/index.php?diff=129497492 & https://fr.wikipedia.org/w/index.php?title=Chemins_de_fer_de_la_Généralité_de_Catalogne&diff=prev&oldid=115134843

On fr.wp, there is over 300 misuses of the equivalent template.

How to solve that

There is several possible ways to solve that.

Change template's message
Possible but wording is hard! Plus it is not possible to say "do that below" because people may edit the following section or are blocked by T146128: Reconsider hiding slugs between two content (text) nodes

Change TemplateData's description
Possible but that description is small sized and pale. That has been done on fr.wp, but wording is still hard

Lock the template
The idea behind is to have a parameter to prevent people to add fiends that have not been defined on the TemplateData.
The possible problem is to have abuses, or templates that have been updated but not the TemplateData.

Thoughts?

Notes

¹ I have an example where the user has added the information twice, on the template and the article itself. I'm pretty sure that user has redone that edit because nothing was displayed from the template. Unfortunately, the following diff has been hidden because it was a copyvio: https://fr.wikipedia.org/w/index.php?title=G%C3%A9rard_Morel_%28romancier%29&type=revision&diff=122306413&oldid=122306215