Page MenuHomePhabricator

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



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¹

Initial examples from fr.wp (ongoing discussion): &é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.



¹ 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: