Page MenuHomePhabricator

VisualEditor allows insertion of extension tags with empty content that later show errors
Open, LowestPublic

Description

Copying and pasting from https://www.mediawiki.org/wiki/Topic:Tphq04qldybm715v:
Steps to reproduce

  1. Create a blank page with VisualEditor
  2. Insert a reference (<ref>) tag
  3. Add a space within ref tag, and insert
  4. Insert a score tag
  5. Add a space within the score tag and insert
  6. Save

Expected
VisualEditor removes the tag and leave empty space (or refuses to insert) because it doesn't contain any useful content and when saved causes errors, e.g. <ref> </ref> is output as <ref/>.

Actual
Upon saving, the both extension tags show errors with tracking categories.

Example (https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=2455494).

Event Timeline

Elitre created this task.Apr 28 2017, 8:19 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 28 2017, 8:19 AM

One edit with the VisualEditor recently inserted «p /» in the wikicode, and the article then appeared in the Lint Errors.

https://fr.wikipedia.org/w/index.php?title=Fondation_de_l%27%C5%92uvre_Notre-Dame&diff=147402657&oldid=144327171

One edit with the VisualEditor recently inserted «p /» in the wikicode, and the article then appeared in the Lint Errors.
https://fr.wikipedia.org/w/index.php?title=Fondation_de_l%27%C5%92uvre_Notre-Dame&diff=147402657&oldid=144327171

This bug seems to be about tags provided by other extensions, such as Extension:Score, and not about the insertion of things like <p> tags in your example. Can you file a separate bug for that, with steps to reproduce?

I am not the author of the diff so I can't confirm my hypothesis, but it is plausible that the same phenomenon happened in both cases: insertion of an « empty » object (that was duely removed) as the only content of the problematical «p» or «ref» tag, the latter then only trimmed instead of removed. Is that possible?

Cirdan added a subscriber: Cirdan.Apr 12 2018, 6:23 PM
Deskana triaged this task as Lowest priority.Aug 29 2018, 1:39 PM
Deskana moved this task from To Triage to Freezer on the VisualEditor board.