Page MenuHomePhabricator

Incorrect parsing of nested references within nested templates
Closed, DuplicatePublic

Description

Visual Editor currently parses certain nested references within nested templates incorrectly. The problem is apparent at

https://en.wikipedia.org/w/index.php?title=Philippine%E2%80%93American_War&oldid=700512044&veaction=edit

which cannot be edited in VE at all. The smallest instance of the bug I was able to create is here:

https://en.wikipedia.org/w/index.php?title=User:AxelBoldt/sandbox1&oldid=700520433&veaction=edit

Event Timeline

AxelBoldt raised the priority of this task from to Needs Triage.
AxelBoldt updated the task description. (Show Details)
AxelBoldt added a project: VisualEditor.
AxelBoldt subscribed.

This looks like a specialised case of T52769: Adding or updating a reference in VisualEditor does not update fake references blocks inside templates and T52474: In VisualEditor, references in templates cannot be reused and are numbered separately from references in the text., I think? More generally, "nested references" is explicitly not supported edge behaviour in MediaWiki and should not be used. I'm aware that hacks like sfn use it, but they aren't supported and may well break in future.