Page MenuHomePhabricator

VisualDiff: Subref footnote markers show the wrong number
Open, LowPublicBUG REPORT

Description

NOTE: stalled because technical implementation is unclear

Steps to replicate the issue

  • Create wikitext:
<ref details="page 1" name="book">Miller</ref>
  • Switch to VE
  • Add anything to the page
  • Click on Save changes... to open the save dialog
  • Click on Review your changes to open the VisualDiff

What happens?:
The rendered preview in the diff shows [1] for the subref

image.png (432×1 px, 31 KB)

What should have happened instead?:
The rendered preview in the diff should show [1.1] for the subref

Technical notes

There are two aspects to this.

Correct numbers

In the VE-core ve.dm.VisualDiff class, footnote numbers are completely overridden with simplistic numbering: ve.setProp( item, 'internal', 'overrideIndex', i + 1 ); . The ve.dm.MWReferenceNode gives this overrideIndex higher priority than its internally-calculated numbers. First, we should try to understand the exact problem that was being solved by this override. Then, we can decide to either continue using the override mechanism and fill it with the formatted subreference number, or we can drop the mechanism and try to simplify how this works. Numbering changes should probably not appear in the diff, but follow existing product decisions.

Screenshot from 2025-09-08 10-06-02.png (310×973 px, 20 KB)

Reference list rendering

In the VE library ve.ui.DiffElement there's a part that handles how the ReferenceList is rendered handleRefList . We probably need to apply changes there to make it understand subrefs.

image.png (310×973 px, 22 KB)

Next steps

  • Get the numbering into the ReferenceNode class ( in the VE lib? )
  • Get the numbers from the new VE ReferenceNode class into the VisualDiff

Event Timeline

Triage:

  • The issue cuts through the happy path when editing and publishing via Visual Editor. Users will experience a broken visual diff when reviewing changes that include a sub-ref. This might lead to confusion and uncertainity at the moment of publishing.
  • The solution is more complex than initially envisioned and requires +2 rights for the VisualEditor Library, which we currently don't have. Getting folks to sync and review the code patches in time for WikiCon Germany, will be challenging for both involved teams and therefore we're postponing work on this until after the first rollout to de.wiki.
  • We will communicate this during the release and on our project pages, which will be linked in the UI.
lilients_WMDE renamed this task from [Bug] VisualDiff: Subref footnote markers don't work in VisualDiff to VisualDiff: Subref footnote markers don't work in VisualDiff.Sep 11 2025, 12:21 PM
lilients_WMDE added a project: Epic.
lilients_WMDE changed the subtype of this task from "Bug Report" to "Task".

Change #1176645 had a related patch set uploaded (by WMDE-Fisch; author: Thiemo Kreuz (WMDE)):

[VisualEditor/VisualEditor@master] Streamline InternalList related logic in VisualDiff

https://gerrit.wikimedia.org/r/1176645

lilients_WMDE renamed this task from VisualDiff: Subref footnote markers don't work in VisualDiff to VisualDiff: Subref footnote markers show the wrong number.Sep 23 2025, 12:15 PM
lilients_WMDE updated the task description. (Show Details)
lilients_WMDE updated the task description. (Show Details)
lilients_WMDE changed the subtype of this task from "Task" to "Bug Report".